diff --git a/Formula/gnu-indent.rb b/Formula/gnu-indent.rb index 230b883ca3..5d2336f1f2 100644 --- a/Formula/gnu-indent.rb +++ b/Formula/gnu-indent.rb @@ -1,5 +1,3 @@ -require "formula" - class GnuIndent < Formula homepage "https://www.gnu.org/software/indent/" url "http://ftpmirror.gnu.org/indent/indent-2.2.10.tar.gz" @@ -28,6 +26,18 @@ class GnuIndent < Formula system "./configure", *args system "make", "install" end + + test do + (testpath/"test.c").write("int main(){ return 0; }") + system "#{bin}/gindent", "test.c" + assert_equal File.read("test.c"), <<-EOS.undent + int + main () + { + return 0; + } + EOS + end end __END__