aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-26 10:42:04 -0500
committerJack Nagel2013-03-26 12:58:44 -0500
commitfbfc9b14bcfc74bd40df5f7dff73efd1db771aa6 (patch)
treee2e4db7ab4e22041ce0a224ae38795d1753827b6 /Library
parent48b91571c13defe73c6f0d741f488e67694a9e2e (diff)
downloadhomebrew-fbfc9b14bcfc74bd40df5f7dff73efd1db771aa6.tar.bz2
unac: improve test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/unac.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/unac.rb b/Library/Formula/unac.rb
index e1c2f4a00..db7acc32f 100644
--- a/Library/Formula/unac.rb
+++ b/Library/Formula/unac.rb
@@ -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