diff options
| author | Mike Naberezny | 2014-04-12 13:57:43 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-04-12 14:41:55 -0700 |
| commit | 56114bb5b8834bedc49bf1d9edbc418ae588712f (patch) | |
| tree | 364be82293a85fe8be84bb3c72968bcc564ec108 /Library/Formula | |
| parent | 1b44cd48ee4d77ea940fb0f69f7281eff087334e (diff) | |
| download | homebrew-56114bb5b8834bedc49bf1d9edbc418ae588712f.tar.bz2 | |
lzip: add test
Closes #28359.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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 |
