diff options
| author | Jack Nagel | 2013-03-24 23:39:48 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-03-26 00:02:30 -0500 |
| commit | ab522c611fea17a294939c04edd9a439aa00f2c6 (patch) | |
| tree | 1119046d397576f58c91c3b1318995f406e4fa85 | |
| parent | ecdde2f80db5527082a4a40fe44a47ad2133c9e3 (diff) | |
| download | homebrew-ab522c611fea17a294939c04edd9a439aa00f2c6.tar.bz2 | |
bsdconv: improve test
| -rw-r--r-- | Library/Formula/bsdconv.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Formula/bsdconv.rb b/Library/Formula/bsdconv.rb index 18b092bc9..bccea15db 100644 --- a/Library/Formula/bsdconv.rb +++ b/Library/Formula/bsdconv.rb @@ -14,8 +14,12 @@ class Bsdconv < Formula system "make", "PREFIX=#{prefix}", "install" end - def test - printf = 'printf "\263\134\245\134\273\134"' - system "test `#{printf} | #{bin}/bsdconv big5:utf-8` = '許功蓋'" + test do + require 'open3' + Open3.popen3("#{bin}/bsdconv", "big5:utf-8") do |stdin, stdout, _| + stdin.write("\263\134\245\134\273\134") + stdin.close + stdout.read == "許功蓋" + end end end |
