diff options
| author | Mike Naberezny | 2014-04-13 12:28:30 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-04-13 15:26:57 -0700 |
| commit | 75d591356ad8da684c699f4b6dde081646a1f11c (patch) | |
| tree | 5189c670e176107acaf34218aa700da640db383f /Library/Formula | |
| parent | afb3335d6a383f3b80935c4c60e14b636cec6f85 (diff) | |
| download | homebrew-75d591356ad8da684c699f4b6dde081646a1f11c.tar.bz2 | |
rzip: add test
Closes #28377.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/rzip.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/rzip.rb b/Library/Formula/rzip.rb index 0395a57dc..676ee280d 100644 --- a/Library/Formula/rzip.rb +++ b/Library/Formula/rzip.rb @@ -15,4 +15,18 @@ class Rzip < Formula bin.install_symlink "rzip" => "runzip" man1.install_symlink "rzip.1" => "runzip.1" end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.rz + system bin/"rzip", path + assert !path.exist? + + # decompress: data.txt.rz -> data.txt + system bin/"rzip", "-d", "#{path}.rz" + assert_equal original_contents, path.read + end end |
