diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/jshon.rb | 9 |
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 |
