From 5ce1bb178f08d1a9ae3ffe0c43c6946c640fd26c Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Wed, 4 Feb 2015 13:12:40 +0100 Subject: dwdiff: test added Closes #36525. Signed-off-by: Mike McQuaid --- Library/Formula/dwdiff.rb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Library') diff --git a/Library/Formula/dwdiff.rb b/Library/Formula/dwdiff.rb index a18dfc7aa..de5bae1aa 100644 --- a/Library/Formula/dwdiff.rb +++ b/Library/Formula/dwdiff.rb @@ -1,5 +1,3 @@ -require "formula" - class Dwdiff < Formula homepage "http://os.ghalkes.nl/dwdiff.html" url "http://os.ghalkes.nl/dist/dwdiff-2.0.9.tgz" @@ -21,11 +19,18 @@ class Dwdiff < Formula ENV.append "CFLAGS", "-I#{gettext.include} -I#{icu4c.include}" ENV.append "LDFLAGS", "-L#{gettext.lib} -L#{icu4c.lib}" system "./configure", "--prefix=#{prefix}" - system "make install" + system "make", "install" # Remove non-English man pages - (man+"nl").rmtree - (man+"nl.UTF-8").rmtree - (share+"locale/nl").rmtree + (man/"nl").rmtree + (man/"nl.UTF-8").rmtree + (share/"locale/nl").rmtree + end + + test do + (testpath/"a").write "I like beers" + (testpath/"b").write "I like formulae" + diff = shell_output("#{bin}/dwdiff a b", 1) + assert_equal "I like [-beers-] {+formulae+}", diff end end -- cgit v1.2.3