base64: add test

Closes Homebrew/homebrew#26410.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Mike Naberezny 2014-02-04 13:13:35 -08:00 committed by Mike McQuaid
parent 463cfe4735
commit 8bd8d1a629
1 changed files with 9 additions and 0 deletions

View File

@ -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