Browse Source

added tests to look at <java's> exception handling.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271280 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
f1548aec2b
1 changed files with 36 additions and 19 deletions
  1. +36
    -19
      src/etc/testcases/taskdefs/java.xml

+ 36
- 19
src/etc/testcases/taskdefs/java.xml View File

@@ -4,65 +4,82 @@

<property name="app"
value="org.apache.tools.ant.taskdefs.JavaTest$$EntryPoint" />

<property name="app2"
value="org.apache.tools.ant.taskdefs.JavaTest$$ExceptingEntryPoint" />
<path id="test.classpath">
<pathelement location="${build.tests}"/>
</path>
<target name="noclassname">
<target name="testNoJarNoClassname">
<java/>
</target>

<target name="jarNoFork">
<target name="testJarNoFork">
<java jar="test.jar" fork="false"/>
</target>
<target name="jarAndClassname">
<target name="testJarAndClassName">
<java jar="test.jar" classname="${app}" />
</target>
<target name="ClassnameAndjar">
<target name="testClassnameAndJar">
<java classname="${app}" jar="test.jar" />
</target>
<target name="run">
<target name="testRun">
<fail unless="tests-classpath.value" />
<java classname="${app}"
classpath="${tests-classpath.value}"/>
</target>

<target name="run-fail">
<target name="testRunFail">
<java classname="${app}"
classpath="tests-classpath.value"
classpath="${tests-classpath.value}"
>
<arg value="-1"/>
<arg value="-1"/>
</java>
</target>

<target name="run-fail-foe">
<target name="testRunFailFoe">
<java classname="${app}"
classpath="tests-classpath.value"
failonerror="true">
<arg value="-1"/>
classpath="${tests-classpath.value}"
failonerror="true">
<arg value="-1"/>
</java>
</target>

<target name="run-fail-foe-fork">
<target name="testRunFailFoeFork">
<java classname="${app}"
classpath="tests-classpath.value"
classpath="${tests-classpath.value}"
failonerror="true"
fork="true">
<arg value="-1"/>
</java>
</target>

<target name="runExpectNoFail">
<java classname="${app}"
classpath="tests-classpath.value"
<target name="testExcepting">
<java classname="${app2}"
classpath="${tests-classpath.value}"
>
</java>
</target>

<target name="testExceptingFoe">
<java classname="${app2}"
classpath="${tests-classpath.value}"
failonerror="true">
<arg value="-1"/>
</java>
</target>

<target name="testExceptingFoeFork">
<java classname="${app2}"
classpath="${tests-classpath.value}"
failonerror="true"
fork="true">
</java>
</target>
</project>

Loading…
Cancel
Save