aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2015-02-14 21:23:01 +0000
committerMike McQuaid2015-02-15 19:11:08 +0000
commit16aa63c9898e7fbc93722b7d92e3e5fde44c9d2f (patch)
treef35c817624a2ad98e1e6e17e510d132117d732af /Library
parentc30469eeb02518fbac35e34c35df66e29bca9516 (diff)
downloadhomebrew-16aa63c9898e7fbc93722b7d92e3e5fde44c9d2f.tar.bz2
ccrypt: added test
Modernised the formula, added a test. Closes #36820. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/ccrypt.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/Library/Formula/ccrypt.rb b/Library/Formula/ccrypt.rb
index 137d18c5d..1a94e264e 100644
--- a/Library/Formula/ccrypt.rb
+++ b/Library/Formula/ccrypt.rb
@@ -1,9 +1,8 @@
-require 'formula'
-
class Ccrypt < Formula
- homepage 'http://ccrypt.sourceforge.net/'
- url 'http://ccrypt.sourceforge.net/download/ccrypt-1.10.tar.gz'
- sha1 '95d4e524abb146946fe6af9d53ed0e5e294b34e2'
+ homepage "http://ccrypt.sourceforge.net/"
+ url "http://ccrypt.sourceforge.net/download/ccrypt-1.10.tar.gz"
+ mirror "https://mirrors.kernel.org/debian/pool/main/c/ccrypt/ccrypt_1.10.orig.tar.gz"
+ sha1 "95d4e524abb146946fe6af9d53ed0e5e294b34e2"
fails_with :clang do
build 318
@@ -14,7 +13,18 @@ class Ccrypt < Formula
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
- system "make install"
- system "make check"
+ system "make", "install"
+ system "make", "check"
+ end
+
+ test do
+ touch "homebrew.txt"
+ system bin/"ccrypt", "-e", testpath/"homebrew.txt", "-K", "secret"
+ assert File.exist?("homebrew.txt.cpt")
+ assert !File.exist?("homebrew.txt")
+
+ system bin/"ccrypt", "-d", testpath/"homebrew.txt.cpt", "-K", "secret"
+ assert File.exist?("homebrew.txt")
+ assert !File.exist?("homebrew.txt.cpt")
end
end