diff options
Diffstat (limited to 'Library/Formula/aescrypt.rb')
| -rw-r--r-- | Library/Formula/aescrypt.rb | 14 |
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 |
