diff options
| author | Xu Cheng | 2014-12-28 22:06:35 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-28 14:37:14 +0000 |
| commit | a9f4fe57ae08564036ada14446e13371a7fd1065 (patch) | |
| tree | c3dc97440b2e8541bd1f00cc4c6cf0255ebd78d5 | |
| parent | 44d789e30bb185a889eab3e001a78d1bc53cef73 (diff) | |
| download | homebrew-a9f4fe57ae08564036ada14446e13371a7fd1065.tar.bz2 | |
gnu-indent: add test
Closes #35310.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/gnu-indent.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Formula/gnu-indent.rb b/Library/Formula/gnu-indent.rb index 230b883ca..5d2336f1f 100644 --- a/Library/Formula/gnu-indent.rb +++ b/Library/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__ |
