aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-04-12 13:57:43 -0700
committerAdam Vandenberg2014-04-12 14:41:55 -0700
commit56114bb5b8834bedc49bf1d9edbc418ae588712f (patch)
tree364be82293a85fe8be84bb3c72968bcc564ec108 /Library
parent1b44cd48ee4d77ea940fb0f69f7281eff087334e (diff)
downloadhomebrew-56114bb5b8834bedc49bf1d9edbc418ae588712f.tar.bz2
lzip: add test
Closes #28359. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/lzip.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/lzip.rb b/Library/Formula/lzip.rb
index 266e56f0f..06177136d 100644
--- a/Library/Formula/lzip.rb
+++ b/Library/Formula/lzip.rb
@@ -13,4 +13,18 @@ class Lzip < Formula
ENV.j1
system "make install"
end
+
+ test do
+ path = testpath/"data.txt"
+ original_contents = "." * 1000
+ path.write original_contents
+
+ # compress: data.txt -> data.txt.lz
+ system "#{bin}/lzip", path
+ assert !path.exist?
+
+ # decompress: data.txt.lz -> data.txt
+ system "#{bin}/lzip", "-d", "#{path}.lz"
+ assert_equal original_contents, path.read
+ end
end