From 56114bb5b8834bedc49bf1d9edbc418ae588712f Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Sat, 12 Apr 2014 13:57:43 -0700 Subject: lzip: add test Closes #28359. Signed-off-by: Adam Vandenberg --- Library/Formula/lzip.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3