diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/openssl.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/openssl.rb b/Library/Formula/openssl.rb index 701b279d4..9e63462cd 100644 --- a/Library/Formula/openssl.rb +++ b/Library/Formula/openssl.rb @@ -78,4 +78,14 @@ class Openssl < Formula openssldir.install_symlink 'osx_cert.pem' => 'cert.pem' end end + + test do + (testpath/'testfile.txt').write("This is a test file") + expected_checksum = "91b7b0b1e27bfbf7bc646946f35fa972c47c2d32" + system "#{bin}/openssl", 'dgst', '-sha1', '-out', 'checksum.txt', 'testfile.txt' + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + end end |
