ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs ImportTest.java
Date Thu, 18 Sep 2003 09:02:23 GMT
bodewig     2003/09/18 02:02:23

  Modified:    src/testcases/org/apache/tools/ant/taskdefs ImportTest.java
  Added:       src/etc/testcases/taskdefs/import/subdir
                        importintarget-inner.xml importintarget.xml
  Log:
  Add tests for <import> inside <target>
  
  Revision  Changes    Path
  1.1                  ant/src/etc/testcases/taskdefs/import/subdir/importintarget-inner.xml
  
  Index: importintarget-inner.xml
  ===================================================================
  <project>
    <property name="foo" value="bar"/>
    <path id="baz">
      <pathelement location="."/>
    </path>
  </project>
  
  
  1.1                  ant/src/etc/testcases/taskdefs/import/subdir/importintarget.xml
  
  Index: importintarget.xml
  ===================================================================
  <project>
    <target name="do-import">
      <import file="importintarget-inner.xml"/>
    </target>
  
    <target name="no-import"/>
  </project>
  
  
  
  1.5       +12 -0     ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java
  
  Index: ImportTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ImportTest.java	17 Jul 2003 10:39:07 -0000	1.4
  +++ ImportTest.java	18 Sep 2003 09:02:23 -0000	1.5
  @@ -90,5 +90,17 @@
           assertLogContaining(
               "Unnamed2.xmlUnnamed1.xmlSkipped already imported file");
       }
  +
  +    public void testImportInTargetNoEffect() {
  +        configureProject("src/etc/testcases/taskdefs/import/subdir/importintarget.xml");
  +        expectPropertyUnset("no-import", "foo");
  +        assertTrue(null == getProject().getReference("baz"));
  +    }
  +
  +    public void testImportInTargetWithEffect() {
  +        configureProject("src/etc/testcases/taskdefs/import/subdir/importintarget.xml");
  +        expectPropertySet("do-import", "foo", "bar");
  +        assertNotNull(getProject().getReference("baz"));
  +    }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message