From 61959549ef7d060e4bef9ed4d7c73eb249a45097 Mon Sep 17 00:00:00 2001 From: Ted Pennings Date: Wed, 5 Mar 2014 21:56:24 -0500 Subject: scala: add a test Closes #27241. Signed-off-by: Adam Vandenberg --- Library/Formula/scala.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3