aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-01-13 10:51:42 +0100
committerMike McQuaid2015-01-13 13:18:22 +0000
commitcc0b5549dc902aa0cb643e6b38d4a1fbe942bad2 (patch)
treede99d132e7f7d1f3643f8a34a4264ef3a77d8e87
parent916b3f24be79f3f13c8ce7cb63b9318ac7040584 (diff)
downloadhomebrew-cc0b5549dc902aa0cb643e6b38d4a1fbe942bad2.tar.bz2
jsawk: test added
Closes #35816. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/jsawk.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/Library/Formula/jsawk.rb b/Library/Formula/jsawk.rb
index e9bc531a9..84ec2a569 100644
--- a/Library/Formula/jsawk.rb
+++ b/Library/Formula/jsawk.rb
@@ -1,16 +1,19 @@
-require 'formula'
-
class Jsawk < Formula
- homepage 'https://github.com/micha/jsawk'
- url 'https://github.com/micha/jsawk/archive/1.4.tar.gz'
- sha1 '4f2c962c8a5209764116457682985854400cbf24'
+ homepage "https://github.com/micha/jsawk"
+ url "https://github.com/micha/jsawk/archive/1.4.tar.gz"
+ sha1 "4f2c962c8a5209764116457682985854400cbf24"
- head 'https://github.com/micha/jsawk.git'
+ head "https://github.com/micha/jsawk.git"
- depends_on 'spidermonkey'
+ depends_on "spidermonkey"
def install
mv "README.markdown", "README"
bin.install "jsawk"
end
+
+ test do
+ cmd = %(#{bin}/jsawk 'this.a = "foo"')
+ assert_equal %({"a":"foo"}\n), pipe_output(cmd, "{}")
+ end
end