aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/scala.rb
diff options
context:
space:
mode:
authorTed Pennings2014-03-05 21:56:24 -0500
committerAdam Vandenberg2014-03-05 19:40:44 -0800
commit61959549ef7d060e4bef9ed4d7c73eb249a45097 (patch)
treecc954edb6e6a95d09eeda668e5c56724f1a62e4b /Library/Formula/scala.rb
parente9fb5f956ccf5088fe5117b028c85df1554b3a3b (diff)
downloadhomebrew-61959549ef7d060e4bef9ed4d7c73eb249a45097.tar.bz2
scala: add a test
Closes #27241. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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