diff --git a/dotty.rb b/dotty.rb index 8b4e18e..7b8f09e 100644 --- a/dotty.rb +++ b/dotty.rb @@ -1,8 +1,8 @@ class Dotty < Formula desc "Experimental Scala Compiler" homepage "http://dotty.epfl.ch/" - url "https://github.com/lampepfl/homebrew-brew/releases/download/v0.1-M1/dotty-0.1.1-bin-SNAPSHOT.zip" - sha256 "d5091aea45679c28774bb2039847a36a7c1f2a1abbe4ae9f79bf669afbca0232" + url "https://github.com/lampepfl/homebrew-brew/releases/download/v0.1-M2/dotty-0.1.1-bin-SNAPSHOT.zip" + sha256 "03d40979cfd265aecbdd5f4d8bed091b2328bdf54230ce42fffd039d9ee18a86" # mirror "https://www.scala-lang.org/files/archive/scala-2.12.2.tgz" bottle :unneeded @@ -15,6 +15,7 @@ def install end test do + # test dotc and dotr: file = testpath/"Test.scala" file.write <<-EOS.undent object Test { @@ -28,5 +29,16 @@ def main(args: Array[String]) = { out = shell_output("#{bin}/dotr Test").strip assert_equal "4", out + + # test dotd: + Dir.mkdir "#{testpath}/site" + index_out = testpath/"site"/"index.md" + index_out.write <<-EOS.undent + Hello, world! + ============= + EOS + shell_output("#{bin}/dotd -siteroot #{testpath}/site #{file}") + index_file = File.open("#{testpath}/site/_site/index.html", "rb").read + assert index_file.include? '

Hello, world!

' end end