<?xml version="1.0" encoding="UTF-8" ?>

<!--
   Gant - A Groovy way of scripting Ant tasks.

   Copyright © 2008-10 Russel Winder

   Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
   compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software distributed under the License is
   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
   implied. See the License for the specific language governing permissions and limitations under the
   License.
  
   Author : Russel Winder <russel@winder.org.uk>
-->

<project name="Gant Ant Task Test" default="gantTestDefaultFileDefaultTarget" basedir=".">

  <import file="commonBits.xml"/>

  <target name="gantTestDefaultFileDefaultTarget" depends="-defineGantTask">
    <gant/>
  </target>
 
  <target name="gantTestDefaultFileNamedTarget" depends="-defineGantTask">
    <gant target="blah"/>
  </target>

 <target name="gantTestNamedFileDefaultTarget" depends="-defineGantTask">
    <gant file="build.gant"/>
  </target>
 
  <target name="gantTestNamedFileNamedTarget" depends="-defineGantTask">
    <gant file="build.gant" target="blah"/>
  </target>

  <!--  Ensure there is no file of the name used in the Gant Ant task here. -->
  <target name="missingGantfile" depends="-defineGantTask">
    <gant file="blahBlahBlahBlah.blah"/>
  </target>

  <!--  Ensure there is no target called blahBlahBlahBlah. -->
  <target name="gantTaskdefVerifyError" depends="-defineGantTask">
    <gant file="build.gant" target="gantTaskdefVerifyError"/>
  </target>

  <target name="gantWithParametersAsNestedTags" depends="-defineGantTask">
    <gant file="build.gant" target="gantParameters">
      <definition name="flob" value="adob"/>
      <definition name="burble"/>
    </gant>
  </target>

  <target name="gantWithMultipleTargets" depends="-defineGantTask">
    <gant>
      <gantTarget value="test"/>
      <gantTarget value="blah"/>
    </gant>
  </target>

  <!-- For GANT-110.  Thanks to Eric Van Dewoestine for providing this. -->

  <target name="gantTestInheritAll" depends="-defineGantTask">
    <property name="gant.test.inheritAll" value="gantInheritAllWorks"/>
    <gant file="build.gant" target="gantInheritAll"/>
    <gant file="build.gant" target="gantInheritAll" inheritAll="false"/>
    <gant file="build.gant" target="gantInheritAll" inheritAll="true"/>
  </target>
  
  <!-- For GANT-111.  Thanks to Eric Van Dewoestine for providing this. -->

  <target name="gantTestFail" depends="-defineGantTask">
    <gant file="build.gant" target="testFail"/>
  </target>
  
</project>
