diff options
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 |
