aespipe: test added
Closes Homebrew/homebrew#37107. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
73c80f921e
commit
8854954c0d
1 changed files with 12 additions and 6 deletions
|
@ -1,12 +1,18 @@
|
|||
require 'formula'
|
||||
|
||||
class Aespipe < Formula
|
||||
homepage 'http://loop-aes.sourceforge.net/'
|
||||
url 'http://loop-aes.sourceforge.net/aespipe/aespipe-v2.4c.tar.bz2'
|
||||
sha1 '198cc0bc1168a7a150de4b7308be096c903b0d90'
|
||||
homepage "http://loop-aes.sourceforge.net/"
|
||||
url "http://loop-aes.sourceforge.net/aespipe/aespipe-v2.4c.tar.bz2"
|
||||
sha1 "198cc0bc1168a7a150de4b7308be096c903b0d90"
|
||||
|
||||
def install
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue