aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-02-23 14:55:44 +0100
committerMike McQuaid2015-02-23 14:40:00 +0000
commita291f8e8b9fcb5a1a22e3d8b890be86f06d06b69 (patch)
tree1180f7855eb0bdf74a8df82edb9fe0561fe80f74 /Library/Formula
parent54de56568511e928612ae32100a3f27db22af39f (diff)
downloadhomebrew-a291f8e8b9fcb5a1a22e3d8b890be86f06d06b69.tar.bz2
aespipe: test added
Closes #37107. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/aespipe.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/Library/Formula/aespipe.rb b/Library/Formula/aespipe.rb
index 55ede77e7..c523f2951 100644
--- a/Library/Formula/aespipe.rb
+++ b/Library/Formula/aespipe.rb
@@ -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