From bbcb8edda9f6540525934b8eea3f72dd299131ec Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Tue, 4 Feb 2014 18:46:16 -0800 Subject: htmlcompressor: add test Closes #26423. Signed-off-by: Mike McQuaid --- Library/Formula/htmlcompressor.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Library/Formula/htmlcompressor.rb b/Library/Formula/htmlcompressor.rb index 5de072602..41258f4eb 100644 --- a/Library/Formula/htmlcompressor.rb +++ b/Library/Formula/htmlcompressor.rb @@ -26,4 +26,17 @@ class Htmlcompressor < Formula ln_s "#{closure.opt_prefix}/libexec/build/compiler.jar", "#{libexec}/compiler.jar" end end + + test do + path = testpath/"index.xml" + path.write <<-EOS + + + + EOS + + output = `#{bin}/htmlcompressor #{path}`.strip + assert_equal "", output + assert_equal 0, $?.exitstatus + end end -- cgit v1.2.3