aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-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