diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/astyle.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Formula/astyle.rb b/Library/Formula/astyle.rb index c0826f121..e7faa0fd5 100644 --- a/Library/Formula/astyle.rb +++ b/Library/Formula/astyle.rb @@ -1,5 +1,3 @@ -require "formula" - class Astyle < Formula homepage "http://astyle.sourceforge.net/" url "https://downloads.sourceforge.net/project/astyle/astyle/astyle%202.05/astyle_2.05_macosx.tar.gz" @@ -19,4 +17,16 @@ class Astyle < Formula bin.install "bin/astyle" end end + + test do + (testpath/"test.c").write("int main(){return 0;}\n") + system "#{bin}/astyle", "--style=gnu", "--indent=spaces=4", + "--lineend=linux", "#{testpath}/test.c" + assert_equal File.read("test.c"), <<-EOS.undent + int main() + { + return 0; + } + EOS + end end |
