aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/scala.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/scala.rb')
-rw-r--r--Library/Formula/scala.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/scala.rb b/Library/Formula/scala.rb
index 35ac248e0..b4718e1b8 100644
--- a/Library/Formula/scala.rb
+++ b/Library/Formula/scala.rb
@@ -54,4 +54,18 @@ class Scala < Formula
#{opt_prefix}/idea
EOS
end
+
+ test do
+ file = testpath/'hello.scala'
+ file.write <<-EOS.undent
+ object Computer {
+ def main(args: Array[String]) {
+ println(2 + 2)
+ }
+ }
+ EOS
+ output = `'#{bin}/scala' #{file}`
+ assert_equal "4", output.strip
+ assert $?.success?
+ end
end