From 81aed31ba952fb6f88d9bc14e8f2534a3053ce85 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Wed, 16 Apr 2014 16:34:10 -0700 Subject: lrzip: add test Closes #28461. Signed-off-by: Adam Vandenberg --- Library/Formula/lrzip.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/lrzip.rb b/Library/Formula/lrzip.rb index 61bf5e82f..ccf91597f 100644 --- a/Library/Formula/lrzip.rb +++ b/Library/Formula/lrzip.rb @@ -14,4 +14,18 @@ class Lrzip < Formula system "make" system "make install" end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.lrz + system bin/"lrzip", "-o", "#{path}.lrz", path + path.unlink + + # decompress: data.txt.lrz -> data.txt + system bin/"lrzip", "-d", "#{path}.lrz" + assert_equal original_contents, path.read + end end -- cgit v1.2.3