aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike Naberezny2014-02-04 18:46:16 -0800
committerMike McQuaid2014-02-05 11:41:36 +0000
commitbbcb8edda9f6540525934b8eea3f72dd299131ec (patch)
treeb3fdf3aa988ca1cba3f6ea1b6558381d0dfff4f5 /Library/Formula
parent33f192755a48fb5dccdd302a9d43f1fd39ee5c48 (diff)
downloadhomebrew-bbcb8edda9f6540525934b8eea3f72dd299131ec.tar.bz2
htmlcompressor: add test
Closes #26423. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/htmlcompressor.rb13
1 files changed, 13 insertions, 0 deletions
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
+ <foo>
+ <bar /> <!-- -->
+ </foo>
+ EOS
+
+ output = `#{bin}/htmlcompressor #{path}`.strip
+ assert_equal "<foo><bar/></foo>", output
+ assert_equal 0, $?.exitstatus
+ end
end