duff: Add test.
Compares two equal files and asserts expected output.
This commit is contained in:
parent
f93d33e6b5
commit
d3d1b4d224
1 changed files with 13 additions and 0 deletions
|
@ -17,4 +17,17 @@ class Duff < Formula
|
|||
"--mandir=#{man}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
expected = <<-EOS.undent
|
||||
2 files in cluster 1 (6 bytes, digest 8843d7f92416211de9ebb963ff4ce28125932878)
|
||||
cmp1
|
||||
cmp2
|
||||
EOS
|
||||
|
||||
(testpath/"cmp1").write "foobar"
|
||||
(testpath/"cmp2").write "foobar"
|
||||
|
||||
assert_equal expected, shell_output("#{bin}/duff cmp1 cmp2")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue