Skip to content

Commit

Permalink
jsmin: add test
Browse files Browse the repository at this point in the history
Closes Homebrew#26648.

Signed-off-by: Adam Vandenberg <[email protected]>
  • Loading branch information
mnaberez authored and adamv committed Feb 12, 2014
1 parent e9575a1 commit e27620a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Library/Formula/jsmin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ def install
system ENV.cc, 'jsmin.c', '-o', 'jsmin'
bin.install 'jsmin'
end

test do
IO.popen("#{bin}/jsmin", "w+") do |pipe|
pipe.puts "var i = 0; // comment"
pipe.close_write
assert_equal "\nvar i=0;", pipe.read
end
end
end

0 comments on commit e27620a

Please sign in to comment.