unac: improve test

This commit is contained in:
Jack Nagel 2013-03-26 10:42:04 -05:00
parent eef05263c7
commit 67949d44c0

View file

@ -40,8 +40,11 @@ class Unac < Formula
system "make install"
end
def test
`#{bin}/unaccent utf-8 fóó`.chomp == 'foo'
test do
require 'open3'
Open3.popen3("#{bin}/unaccent", "utf-8", "fóó") do |_, stdout, _|
"foo" == stdout.read.strip
end
end
end