aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-26 22:47:12 +0100
committerXu Cheng2015-03-28 00:01:31 +0800
commit67b40c303d37d8246f78b19db62aef91ba289582 (patch)
tree7c948484134df6cc2e3e94e98c09f711195992d4 /Library/Formula
parent20db25fa3788b59db88431f24c91ced020a4de04 (diff)
downloadhomebrew-67b40c303d37d8246f78b19db62aef91ba289582.tar.bz2
fcrackzip: test added
Closes #38109. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/fcrackzip.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/Library/Formula/fcrackzip.rb b/Library/Formula/fcrackzip.rb
index 57109ccf5..2f19b708e 100644
--- a/Library/Formula/fcrackzip.rb
+++ b/Library/Formula/fcrackzip.rb
@@ -1,14 +1,19 @@
-require 'formula'
-
class Fcrackzip < Formula
- homepage 'http://oldhome.schmorp.de/marc/fcrackzip.html'
- url 'http://oldhome.schmorp.de/marc/data/fcrackzip-1.0.tar.gz'
- sha1 '92e4f8caa880c55b20e13feb7a25c8b8fd3accf8'
+ homepage "http://oldhome.schmorp.de/marc/fcrackzip.html"
+ url "http://oldhome.schmorp.de/marc/data/fcrackzip-1.0.tar.gz"
+ sha256 "4a58c8cb98177514ba17ee30d28d4927918bf0bdc3c94d260adfee44d2d43850"
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make"
- system "make install"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"secret").write "homebrew"
+ system "zip", "-qe", "-P", "a", "secret.zip", "secret"
+ assert_equal "PASSWORD FOUND!!!!: pw == a",
+ shell_output("#{bin}/fcrackzip -u -l 1 secret.zip").strip
end
end