aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/cdb.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/Library/Formula/cdb.rb b/Library/Formula/cdb.rb
index d386e0d01..63ee803c1 100644
--- a/Library/Formula/cdb.rb
+++ b/Library/Formula/cdb.rb
@@ -1,12 +1,18 @@
-require 'formula'
-
class Cdb < Formula
- homepage 'http://cr.yp.to/cdb.html'
- url 'http://cr.yp.to/cdb/cdb-0.75.tar.gz'
- sha1 '555749be5b2617e29e44b5326a2536813d62c248'
+ homepage "http://cr.yp.to/cdb.html"
+ url "http://cr.yp.to/cdb/cdb-0.75.tar.gz"
+ sha256 "1919577799a50c080a8a05a1cbfa5fa7e7abc823d8d7df2eeb181e624b7952c5"
def install
inreplace "conf-home", "/usr/local", prefix
- system "make setup"
+ system "make", "setup"
+ end
+
+ test do
+ record = "+4,8:test->homebrew\n\n"
+ pipe_output("#{bin}/cdbmake db dbtmp", record, 0)
+ assert File.exist? "db"
+ assert_equal(record,
+ pipe_output("#{bin}/cdbdump", (testpath/"db").binread, 0))
end
end