aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-01-02 14:15:41 +0800
committerMike McQuaid2015-01-02 09:54:04 +0000
commit86521de809b4aeea872dd2567395c1b068dd69a2 (patch)
tree96bf64489205c7a3f15e29513d5b9dcc1a58945f
parenta6ad15481a494da525d1a847b5f210d58e78a44b (diff)
downloadhomebrew-86521de809b4aeea872dd2567395c1b068dd69a2.tar.bz2
moreutils: add test
Closes #35449. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/moreutils.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/Library/Formula/moreutils.rb b/Library/Formula/moreutils.rb
index 62ba11688..7fe39d73e 100644
--- a/Library/Formula/moreutils.rb
+++ b/Library/Formula/moreutils.rb
@@ -1,10 +1,8 @@
-require 'formula'
-
class Moreutils < Formula
- homepage 'http://joeyh.name/code/moreutils/'
- url 'http://mirrors.kernel.org/debian/pool/main/m/moreutils/moreutils_0.52.tar.gz'
- mirror 'http://ftp.us.debian.org/debian/pool/main/m/moreutils/moreutils_0.52.tar.gz'
- sha1 '32047f935178b490a12c370d8f695f1273dc5895'
+ homepage "http://joeyh.name/code/moreutils/"
+ url "http://mirrors.kernel.org/debian/pool/main/m/moreutils/moreutils_0.52.tar.gz"
+ mirror "http://ftp.us.debian.org/debian/pool/main/m/moreutils/moreutils_0.52.tar.gz"
+ sha1 "32047f935178b490a12c370d8f695f1273dc5895"
bottle do
revision 2
@@ -62,4 +60,11 @@ class Moreutils < Formula
system "make", "install", "PREFIX=#{prefix}"
bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"])
end
+
+ test do
+ pipe_output("#{bin}/isutf8", "hello")
+ assert $?.success?
+ pipe_output("#{bin}/isutf8", "\xca\xc0\xbd\xe7")
+ assert (!$?.success?)
+ end
end