lrzip: add test

Closes Homebrew/homebrew#28461.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Mike Naberezny 2014-04-16 16:34:10 -07:00 committed by Adam Vandenberg
parent 8586a681f4
commit d036365d16
1 changed files with 14 additions and 0 deletions

View File

@ -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