aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/spidermonkey.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb
index 664084854..7e08a4929 100644
--- a/Library/Formula/spidermonkey.rb
+++ b/Library/Formula/spidermonkey.rb
@@ -41,4 +41,13 @@ class Spidermonkey < Formula
bin.install "shell/js"
end
end
+
+ test do
+ path = testpath/"test.js"
+ path.write "print('hello');"
+
+ output = `#{bin}/js #{path}`.strip
+ assert_equal "hello", output
+ assert_equal 0, $?.exitstatus
+ end
end