diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ant.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Library/Formula/ant.rb b/Library/Formula/ant.rb index d46eaf554..85e76c926 100644 --- a/Library/Formula/ant.rb +++ b/Library/Formula/ant.rb @@ -14,6 +14,26 @@ class Ant < Formula end test do - system "#{bin}/ant", "-version" + (testpath/'build.xml').write <<-EOS.undent + <project name="HomebrewTest" basedir="."> + <property name="src" location="src"/> + <property name="build" location="build"/> + <target name="init"> + <mkdir dir="${build}"/> + </target> + <target name="compile" depends="init"> + <javac srcdir="${src}" destdir="${build}"/> + </target> + </project> + EOS + (testpath/'src/main/java/org/homebrew/AntTest.java').write <<-EOS.undent + package org.homebrew; + public class AntTest { + public static void main(String[] args) { + System.out.println("Testing Ant with Homebrew!"); + } + } + EOS + system "#{bin}/ant", "compile" end end |
