gnu-indent: add test
Closes Homebrew/homebrew#35310. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
4a693fc4fc
commit
a9e567ed4d
1 changed files with 12 additions and 2 deletions
|
@ -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__
|
||||
|
|
Loading…
Reference in a new issue