diff options
| author | Baptiste Fontaine | 2014-12-12 09:48:43 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2014-12-12 09:52:23 +0000 | 
| commit | 4fdf6ec46ace530691dfbf1dfcc0213ae6a2825e (patch) | |
| tree | 2017d9a70402a5a2c386d27147b5e9d33c797986 | |
| parent | 664a15e438c322f62f8673822397317e3d8d3a05 (diff) | |
| download | homebrew-4fdf6ec46ace530691dfbf1dfcc0213ae6a2825e.tar.bz2 | |
aescrypt: add test.
Closes #34916.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -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 | 
