bcrypt: add test
Closes Homebrew/homebrew#35391. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
cf505dca77
commit
b5dfeba29c
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue