diff options
| author | Baptiste Fontaine | 2015-01-12 10:50:21 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-12 13:33:59 +0000 |
| commit | 8cce4de8afeef887f2c17356e918d57e43aa3db8 (patch) | |
| tree | deb984c200462f3802ab35374eb2fdf8d3a88f83 /Library | |
| parent | a3618ff8f235c0d97060b37a3303687125169b72 (diff) | |
| download | homebrew-8cce4de8afeef887f2c17356e918d57e43aa3db8.tar.bz2 | |
uncrustify 0.61
Closes #35776.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/uncrustify.rb | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Library/Formula/uncrustify.rb b/Library/Formula/uncrustify.rb index 96ee60e5a..ae3465adc 100644 --- a/Library/Formula/uncrustify.rb +++ b/Library/Formula/uncrustify.rb @@ -1,15 +1,29 @@ -require 'formula' - class Uncrustify < Formula - homepage 'http://uncrustify.sourceforge.net/' - url 'https://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.60/uncrustify-0.60.tar.gz' - sha1 '769a7649a1cefb80beff9b67b11b4b87a8cc8e0e' + homepage "http://uncrustify.sourceforge.net/" + url "https://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz" + sha1 "711f6f081e596aa7e162b6035997d5e2eed2f49a" - head 'https://github.com/bengardner/uncrustify.git' + head "https://github.com/bengardner/uncrustify.git" def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make install" + system "make", "install" + end + + test do + (testpath/"t.c").write <<-EOS.undent + #include <stdio.h> + int main(void) {return 0;} + EOS + expected = <<-EOS.undent + #include <stdio.h> + int main(void) { + \treturn 0; + } + EOS + + system "#{bin}/uncrustify", "-c", "#{share}/uncrustify/defaults.cfg", "t.c" + assert_equal expected, File.read("#{testpath}/t.c.uncrustify") end end |
