homebrew-core/Formula/cowsay.rb
Mike Naberezny 116073d13d cowsay: add test
Closes Homebrew/homebrew#26593.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-02-10 19:41:30 -08:00

22 lines
608 B
Ruby

require 'formula'
class Cowsay < Formula
homepage 'http://www.nog.net/~tony/warez/cowsay.shtml'
url 'http://ftp.acc.umu.se/mirror/cdimage/snapshot/Debian/pool/main/c/cowsay/cowsay_3.03.orig.tar.gz'
sha1 'cc65a9b13295c87df94a58caa8a9176ce5ec4a27'
# Official download is 404:
# url 'http://www.nog.net/~tony/warez/cowsay-3.03.tar.gz'
def install
system "/bin/sh", "install.sh", prefix
mv prefix/'man', share
end
test do
output = `#{bin}/cowsay moo`
assert output.include?("moo") # bubble
assert output.include?("^__^") # cow
assert_equal 0, $?.exitstatus
end
end