<?xml version="1.0"?>

<project name="test" basedir="." default="invalid">

  <target name="invalid">
    <fail>This file should only be run via a testcase</fail>
  </target>

  <target name="empty">
    <typedef />
  </target>

  <target name="noClassname">
    <typedef name="dummy" />
  </target>

  <target name="noName">
    <typedef classname="org.example.types.TypedefTestType">
      <classpath refid="testclasses" />
    </typedef>
  </target>

  <target name="classNotFound">
    <typedef name="" classname="oops"/>
  </target>

  <path id="testclasses">
    <pathelement location="../../../../build/testcases" />
    <pathelement path="${java.class.path}" />
  </path>

  <typedef name="global"
           classname="org.example.types.TypedefTestType">
    <classpath refid="testclasses" />
  </typedef>

  <target name="testGlobal">
    <global id="global" />
  </target>

  <target name="testLocal">
    <typedef name="localtype"
             classname="org.example.types.TypedefTestType">
      <classpath refid="testclasses" />
    </typedef>
    <localtype id="local" />
  </target>

  <target name="double-notpresent">
    <typedef name="mytask" classname="notpresent" onerror="ignore"/>
    <typedef name="mytask" classname="notpresent" onerror="ignore"/>
    <typedef name="mytask" classname="org.apache.tools.ant.taskdefs.Echo"
             onerror="ignore"/>
    <mytask>hi</mytask>
  </target>
  
  <target name="noresourcefailall">
  	<typedef resource="somenotpresentfile.properties" onerror="failall"/>
  </target>
  
  <target name="noresourcefail">
  	<typedef resource="somenotpresentfile.properties" onerror="fail"/>
  </target>
  
  <target name="noresourcenotfail">
  	<typedef resource="somenotpresentfile.properties" />
  </target>
</project>
