diff options
| author | Ted Pennings | 2014-01-16 23:29:18 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-17 10:25:17 +0000 |
| commit | 79b25362ba18166165b104e36cd76bac15926110 (patch) | |
| tree | 0c7dc3cc24f68035cf835e8b4b485e834e0a7466 /Library/Formula | |
| parent | 2855ed1f0d8cbd6e28cd1367a56b1e08fa49ad40 (diff) | |
| download | homebrew-79b25362ba18166165b104e36cd76bac15926110.tar.bz2 | |
ant: a more stringent test that compiles code
Closes #25977.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -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 |
