diff options
| author | Xu Cheng | 2014-12-31 20:33:24 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-31 14:56:49 +0000 |
| commit | 0c8e9fd02645225834cbb421c3f574ba0e3e4baf (patch) | |
| tree | 2c6dadd4307bb0b98b33e2ad231d855241fc6583 /Library | |
| parent | 3e518edd7ad613f0f412bf671de5f88f6903e618 (diff) | |
| download | homebrew-0c8e9fd02645225834cbb421c3f574ba0e3e4baf.tar.bz2 | |
bcrypt: add test
Closes #35391.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/bcrypt.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/bcrypt.rb b/Library/Formula/bcrypt.rb index cdc68dafd..311250ee1 100644 --- a/Library/Formula/bcrypt.rb +++ b/Library/Formula/bcrypt.rb @@ -10,4 +10,12 @@ class Bcrypt < Formula bin.install "bcrypt" man1.install gzip("bcrypt.1") end + + test do + (testpath/"test.txt").write("Hello World!") + pipe_output("#{bin}/bcrypt -r test.txt", "12345678\n12345678\n") + mv "test.txt.bfe", "test.out.txt.bfe" + pipe_output("#{bin}/bcrypt -r test.out.txt.bfe", "12345678\n") + assert_equal File.read("test.txt"), File.read("test.out.txt") + end end |
