diff options
| author | Baptiste Fontaine | 2015-03-25 22:18:39 +0100 |
|---|---|---|
| committer | Xu Cheng | 2015-03-28 00:03:48 +0800 |
| commit | ead8a57915e018eba65838398a0e1b46d9836919 (patch) | |
| tree | 850c40126e0a4bac44f850175f07df7ec785f1ed /Library | |
| parent | 9a1841355d959cdb052f9a769088cf9e30541b85 (diff) | |
| download | homebrew-ead8a57915e018eba65838398a0e1b46d9836919.tar.bz2 | |
cdb: test added
Closes #38076.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/cdb.rb | 18 |
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 |
