diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/xz.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/xz.rb b/Library/Formula/xz.rb index 08899063b..26c396320 100644 --- a/Library/Formula/xz.rb +++ b/Library/Formula/xz.rb @@ -24,4 +24,18 @@ class Xz < Formula "--prefix=#{prefix}" system "make install" end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.xz + system bin/"xz", path + assert !path.exist? + + # decompress: data.txt.xz -> data.txt + system bin/"xz", "-d", "#{path}.xz" + assert_equal original_contents, path.read + end end |
