yuicompressor: add test
Closes Homebrew/homebrew#26438. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
b918d263ca
commit
4ec1a004c4
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue