aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-17 22:39:44 +0100
committerBrett Koonce2015-03-18 22:44:24 -0700
commitda503bd46819d4b9357b6c519ff812c8a1733d3e (patch)
treec532e3064c6454bd946a68b16261e3c0768d3475 /Library/Formula
parent0f2792245dd7f4fa99f5db650497211e23b4c39c (diff)
downloadhomebrew-da503bd46819d4b9357b6c519ff812c8a1733d3e.tar.bz2
style-check: add test
Closes #37813. Signed-off-by: Brett Koonce <koonce@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/style-check.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/Library/Formula/style-check.rb b/Library/Formula/style-check.rb
index 3114d31df..ac9e0fc64 100644
--- a/Library/Formula/style-check.rb
+++ b/Library/Formula/style-check.rb
@@ -1,14 +1,19 @@
-require 'formula'
-
class StyleCheck < Formula
- homepage 'http://www.cs.umd.edu/~nspring/software/style-check-readme.html'
- url 'http://www.cs.umd.edu/~nspring/software/style-check-0.14.tar.gz'
- sha1 '7308ba19fb05a84e2a8cad935b8056feba63d83b'
+ homepage "https://www.cs.umd.edu/~nspring/software/style-check-readme.html"
+ url "https://www.cs.umd.edu/~nspring/software/style-check-0.14.tar.gz"
+ sha256 "2ae806fcce9e3b80162c64634422dc32d7f0e6f8a81ba5bc7879358744b4e119"
def install
- inreplace "style-check.rb", '/etc/style-check.d/', etc+'style-check.d/'
+ inreplace "style-check.rb", "/etc/style-check.d/", etc/"style-check.d/"
system "make", "PREFIX=#{prefix}",
"SYSCONFDIR=#{etc}/style-check.d",
"install"
end
+
+ test do
+ (testpath/".style-censor").write "homebrew % capitalize Homebrew\n"
+ (testpath/"paper.tex").write "Today I worked on homebrew\n"
+
+ system "#{bin}/style-check.rb", "-v", "paper.tex"
+ end
end