unac: improve test

This commit is contained in:
Jack Nagel committed 2013-03-26 12:58:44 -05:00
1 parent 48b91571c1
commit fbfc9b14bc
1 file changed
+5 -2
+5 -2
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