<project>
  <property name="file" location="echoed.xml" />
  <target name="init">
    <echoxml file="${file}">
      <project>
        <property name="foo" value="bar" />
        <fail message="$$$${foo}=$${foo}">
          <condition>
            <istrue value="${mustfail}" />
          </condition>
        </fail>
      </project>
    </echoxml>
  </target>
  <target name="tearDown">
    <delete file="${file}" />
  </target>
  <target name="testPass" depends="init">
    <ant antfile="${file}" />
  </target>
  <target name="testFail" depends="init">
    <ant antfile="${file}">
      <property name="mustfail" value="true" />
    </ant>
  </target>
  <target name="testEmpty">
    <echoxml />
  </target>
</project>
