aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike Naberezny2014-02-04 13:13:35 -0800
committerMike McQuaid2014-02-04 21:18:06 +0000
commit62a106ce02f3ccd7ceef86d65a8385245b2fdc0c (patch)
tree9d45a2fd91bb260c454f4113d247186be950b41e /Library/Formula
parent08eed524f00204c4752ba4ef2ba0d335466dd740 (diff)
downloadhomebrew-62a106ce02f3ccd7ceef86d65a8385245b2fdc0c.tar.bz2
base64: add test
Closes #26410. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/base64.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/base64.rb b/Library/Formula/base64.rb
index 9a78847ba..9e74e8079 100644
--- a/Library/Formula/base64.rb
+++ b/Library/Formula/base64.rb
@@ -11,4 +11,13 @@ class Base64 < Formula
bin.install "base64"
man1.install "base64.1"
end
+
+ test do
+ path = testpath/"a.txt"
+ path.write "hello"
+
+ output = `#{bin}/base64 #{path}`.strip
+ assert_equal "aGVsbG8=", output
+ assert_equal 0, $?.exitstatus
+ end
end