diff options
| author | Mike Naberezny | 2014-02-05 11:53:47 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-05 23:03:43 -0800 |
| commit | d96852229de85b65179439595314bc84ea9a717a (patch) | |
| tree | 6f4c7e1163bff0d7b318ed26b8b51f730d0ed918 /Library | |
| parent | 666c2a526104047b751356aafc4efc646b558b68 (diff) | |
| download | homebrew-d96852229de85b65179439595314bc84ea9a717a.tar.bz2 | |
yuicompressor: add test
Closes #26438.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/yuicompressor.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/yuicompressor.rb b/Library/Formula/yuicompressor.rb index bedffc569..1dafc55a5 100644 --- a/Library/Formula/yuicompressor.rb +++ b/Library/Formula/yuicompressor.rb @@ -9,4 +9,16 @@ class Yuicompressor < Formula libexec.install "yuicompressor-#{version}.jar" bin.write_jar_script libexec/"yuicompressor-#{version}.jar", "yuicompressor" end + + test do + path = testpath/"test.js" + path.write <<-EOS + var i = 1; // foo + console.log(i); // bar + EOS + + output = `#{bin}/yuicompressor --nomunge --preserve-semi #{path}`.strip + assert_equal "var i=1;console.log(i);", output + assert_equal 0, $?.exitstatus + end end |
