Skip to content

Commit

Permalink
wdiff: add test
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#28382.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
  • Loading branch information
mnaberez authored and mistydemeo committed Apr 14, 2014
1 parent 9a8855f commit ee8b62c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Formula/wdiff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@ def install
"--enable-experimental"
system "make install"
end

test do
a = testpath/"a.txt"
a.write "The missing package manager for OS X"

b = testpath/"b.txt"
b.write "The package manager for OS X"

out = `#{bin}/wdiff #{a} #{b}`
assert_equal "The [-missing-] package manager for OS X", out
assert_equal 1, $?.exitstatus
end
end

0 comments on commit ee8b62c

Please sign in to comment.