duff: Add test.

Compares two equal files and asserts expected output.
This commit is contained in:
William Woodruff 2016-05-06 09:29:20 -04:00 committed by Mike McQuaid
parent f93d33e6b5
commit d3d1b4d224

View file

@ -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