From 62a106ce02f3ccd7ceef86d65a8385245b2fdc0c Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Tue, 4 Feb 2014 13:13:35 -0800 Subject: base64: add test Closes #26410. Signed-off-by: Mike McQuaid --- Library/Formula/base64.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3