From 6cea809e626852a7498408f88ab9dba09e7bdf61 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Mon, 17 Feb 2014 16:12:53 -0800 Subject: spidermonkey: add test Closes #26798. Signed-off-by: Adam Vandenberg --- Library/Formula/spidermonkey.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3