blob: 75b3957c10a6aa1a5e9f5f9fa2ae7155583e9e0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
require 'formula'
class Jshon < Formula
homepage 'http://kmkeen.com/jshon/'
url 'http://kmkeen.com/jshon/jshon.tar.gz'
version '8'
sha1 'e8d710f621ed42ab126c921f87bc8906af16cd1d'
depends_on 'jansson'
def install
system 'make'
bin.install 'jshon'
man1.install 'jshon.1'
end
test do
require 'open3'
Open3.popen3("#{bin}/jshon", "-l") do |stdin, stdout, _|
stdin.write("[true,false,null]")
stdin.close
assert_equal "3", stdout.read.strip
end
end
end
|