<?xml version="1.0"?>

<project name="java-test" basedir="." default="">

  <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="testNoJarNoClassname">
    <java/>
  </target>

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

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

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

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

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

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

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