phantomjs: add test
Closes Homebrew/homebrew#26801. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
2129c822bd
commit
7991cabf03
1 changed files with 12 additions and 0 deletions
|
@ -28,4 +28,16 @@ class Phantomjs < Formula
|
|||
bin.install 'bin/phantomjs'
|
||||
(share+'phantomjs').install 'examples'
|
||||
end
|
||||
|
||||
test do
|
||||
path = testpath/"test.js"
|
||||
path.write <<-EOS
|
||||
console.log('hello');
|
||||
phantom.exit();
|
||||
EOS
|
||||
|
||||
output = `#{bin}/phantomjs #{path}`.strip
|
||||
assert_equal "hello", output
|
||||
assert_equal 0, $?.exitstatus
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue