aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-02-17 16:12:53 -0800
committerAdam Vandenberg2014-02-17 17:53:43 -0800
commit6cea809e626852a7498408f88ab9dba09e7bdf61 (patch)
tree142d533147d3229d4cb1fb131d9f6e5af6c28314 /Library
parent2eaa2cda22992d70df7a0e35512eea831444f1b1 (diff)
downloadhomebrew-6cea809e626852a7498408f88ab9dba09e7bdf61.tar.bz2
spidermonkey: add test
Closes #26798. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-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