aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/bcrypt.rb
diff options
context:
space:
mode:
authorXu Cheng2014-12-31 20:33:24 +0800
committerMike McQuaid2014-12-31 14:56:49 +0000
commit0c8e9fd02645225834cbb421c3f574ba0e3e4baf (patch)
tree2c6dadd4307bb0b98b33e2ad231d855241fc6583 /Library/Formula/bcrypt.rb
parent3e518edd7ad613f0f412bf671de5f88f6903e618 (diff)
downloadhomebrew-0c8e9fd02645225834cbb421c3f574ba0e3e4baf.tar.bz2
bcrypt: add test
Closes #35391. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/bcrypt.rb')
-rw-r--r--Library/Formula/bcrypt.rb8
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