aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2014-12-12 09:48:43 +0100
committerMike McQuaid2014-12-12 09:52:23 +0000
commit4fdf6ec46ace530691dfbf1dfcc0213ae6a2825e (patch)
tree2017d9a70402a5a2c386d27147b5e9d33c797986
parent664a15e438c322f62f8673822397317e3d8d3a05 (diff)
downloadhomebrew-4fdf6ec46ace530691dfbf1dfcc0213ae6a2825e.tar.bz2
aescrypt: add test.
Closes #34916. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/aescrypt.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Formula/aescrypt.rb b/Library/Formula/aescrypt.rb
index 2e74b08f6..179a0cda6 100644
--- a/Library/Formula/aescrypt.rb
+++ b/Library/Formula/aescrypt.rb
@@ -8,6 +8,18 @@ class Aescrypt < Formula
def install
system "./configure"
system "make"
- bin.install 'aescrypt', 'aesget'
+ bin.install "aescrypt", "aesget"
+ end
+
+ test do
+ (testpath/"key").write "kk=12345678901234567890123456789abc0"
+
+ require "open3"
+ Open3.popen3("#{bin}/aescrypt", "-k", testpath/"key") do |stdin, stdout, _|
+ stdin.write("hello")
+ stdin.close
+ # we can't predict the output
+ stdout.read.length > 0
+ end
end
end