diff options
| author | Mike Naberezny | 2014-02-04 18:46:16 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-02-05 11:41:36 +0000 |
| commit | bbcb8edda9f6540525934b8eea3f72dd299131ec (patch) | |
| tree | b3fdf3aa988ca1cba3f6ea1b6558381d0dfff4f5 /Library/Formula | |
| parent | 33f192755a48fb5dccdd302a9d43f1fd39ee5c48 (diff) | |
| download | homebrew-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.rb | 13 |
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 |
