diff options
| author | Ted Pennings | 2014-01-13 21:05:25 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-14 08:19:17 +0000 |
| commit | 623750ae2877d693ce25e72ff82eb65122811656 (patch) | |
| tree | 1481de56fd08329ca43c74e2116e7cd8242dd833 /Library/Formula | |
| parent | 5cba4511f3a233b4173dfae20696077124c080e1 (diff) | |
| download | homebrew-623750ae2877d693ce25e72ff82eb65122811656.tar.bz2 | |
md5sha1sum: Add a test
Closes #25883.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/md5sha1sum.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/md5sha1sum.rb b/Library/Formula/md5sha1sum.rb index b657d7f15..5975ee4fe 100644 --- a/Library/Formula/md5sha1sum.rb +++ b/Library/Formula/md5sha1sum.rb @@ -14,4 +14,13 @@ class Md5sha1sum < Formula bin.install_symlink bin/'md5sum' => 'sha1sum' bin.install_symlink bin/'md5sum' => 'ripemd160sum' end + + test do + (testpath/'file.txt').write('This is a test file with a known checksum') + (testpath/'file.txt.sha1').write <<-EOS.undent + 52623d47c33ad3fac30c4ca4775ca760b893b963 file.txt + EOS + system "#{bin}/sha1sum", '--check', 'file.txt.sha1' + end + end |
