aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-01-16 15:25:46 +0800
committerMike McQuaid2015-01-16 08:43:51 +0000
commit037ec8f9d7b022474f0b0eb314e030d490aa150c (patch)
tree29bf738c7866ab6049e6fc2d2b32bf1b975ac414 /Library
parent5ad791bc057bb3e6063d29d4aadc1f3c9118557a (diff)
downloadhomebrew-037ec8f9d7b022474f0b0eb314e030d490aa150c.tar.bz2
bib-tool: add test and modernize
Closes #35932. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/bib-tool.rb24
1 files changed, 18 insertions, 6 deletions
diff --git a/Library/Formula/bib-tool.rb b/Library/Formula/bib-tool.rb
index f976a41d6..e150aef27 100644
--- a/Library/Formula/bib-tool.rb
+++ b/Library/Formula/bib-tool.rb
@@ -1,13 +1,25 @@
-require 'formula'
-
class BibTool < Formula
- homepage 'http://www.gerd-neugebauer.de/software/TeX/BibTool/index.en.html'
- url 'http://www.gerd-neugebauer.de/software/TeX/BibTool/BibTool-2.57.tar.gz'
- sha1 'a6e80c86d347a39f3883e552db2dd4deb72b0e86'
+ homepage "http://www.gerd-neugebauer.de/software/TeX/BibTool/index.en.html"
+ url "http://www.gerd-neugebauer.de/software/TeX/BibTool/BibTool-2.57.tar.gz"
+ sha1 "a6e80c86d347a39f3883e552db2dd4deb72b0e86"
def install
system "./configure", "--prefix=#{prefix}", "--without-kpathsea"
system "make"
- system "make install"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.bib").write <<-EOS.undent
+ @article{Homebrew,
+ title = {Something},
+ author = {Someone},
+ journal = {Something},
+ volume = {1},
+ number = {2},
+ pages = {3--4}
+ }
+ EOS
+ system "#{bin}/bibtool", "test.bib"
end
end