aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-26 10:45:52 -0500
committerJack Nagel2013-03-26 12:58:44 -0500
commitf1b3d2597b0fb40a3d781157ef65c3fbd2f64d02 (patch)
tree121bef0c578042877b01c62ea3513cfb1016c7b5 /Library
parentfbfc9b14bcfc74bd40df5f7dff73efd1db771aa6 (diff)
downloadhomebrew-f1b3d2597b0fb40a3d781157ef65c3fbd2f64d02.tar.bz2
jshon: improve test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/jshon.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Formula/jshon.rb b/Library/Formula/jshon.rb
index 6308397a0..9caa75b91 100644
--- a/Library/Formula/jshon.rb
+++ b/Library/Formula/jshon.rb
@@ -14,7 +14,12 @@ class Jshon < Formula
man1.install 'jshon.1'
end
- def test
- system "echo '[true,false,null]'| #{bin}/jshon -l"
+ test do
+ require 'open3'
+ Open3.popen3("#{bin}/jshon", "-l") do |stdin, stdout, _|
+ stdin.write("[true,false,null]")
+ stdin.close
+ "3" == stdout.read.strip
+ end
end
end