jshon: improve test
This commit is contained in:
parent
67949d44c0
commit
54b061f418
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue