diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/lzip.rb | 14 |
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 |
