aespipe: test added

Closes Homebrew/homebrew#37107.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Baptiste Fontaine 2015-02-23 14:55:44 +01:00 committed by Mike McQuaid
parent 73c80f921e
commit 8854954c0d

View file

@ -1,12 +1,18 @@
require 'formula'
class Aespipe < Formula class Aespipe < Formula
homepage 'http://loop-aes.sourceforge.net/' homepage "http://loop-aes.sourceforge.net/"
url 'http://loop-aes.sourceforge.net/aespipe/aespipe-v2.4c.tar.bz2' url "http://loop-aes.sourceforge.net/aespipe/aespipe-v2.4c.tar.bz2"
sha1 '198cc0bc1168a7a150de4b7308be096c903b0d90' sha1 "198cc0bc1168a7a150de4b7308be096c903b0d90"
def install def install
system "./configure", "--prefix=#{prefix}" system "./configure", "--prefix=#{prefix}"
system "make install" system "make", "install"
end
test do
(testpath/"secret").write "thisismysecrethomebrewdonttellitplease"
msg = "Hello this is Homebrew"
encrypted = pipe_output("#{bin}/aespipe -P secret", msg)
decrypted = pipe_output("#{bin}/aespipe -P secret -d", encrypted)
assert_equal msg, decrypted.gsub(/\x0+$/, "")
end end
end end