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 MoveTest.java
Date Mon, 19 May 2003 14:05:23 GMT
bodewig     2003/05/19 07:05:23

  Modified:    src/etc/testcases/taskdefs move.xml
               src/testcases/org/apache/tools/ant/taskdefs MoveTest.java
  Log:
  Demonstrate bug 11732
  
  Revision  Changes    Path
  1.3       +21 -0     ant/src/etc/testcases/taskdefs/move.xml
  
  Index: move.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/move.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- move.xml	6 Mar 2002 03:25:50 -0000	1.2
  +++ move.xml	19 May 2003 14:05:22 -0000	1.3
  @@ -22,9 +22,30 @@
       </move>
     </target>
   
  +  <!-- Bugzilla Report 11732 -->
  +  <target name="testDirectoryRemoval">
  +    <mkdir dir="A/B"/>
  +    <mkdir dir="A/C"/>
  +    <mkdir dir="A/D"/>
  +    <touch file="A/B/1"/>
  +    <touch file="A/C/2"/>
  +    <touch file="A/D/3"/>
  +    <mkdir dir="E"/>
  +    <move todir="E" includeemptydirs="true">
  +      <fileset dir="A">
  +        <include name="C"/>
  +        <include name="D"/>
  +        <include name="C/**"/>
  +        <include name="D/**"/>
  +      </fileset>
  +    </move>
  +  </target>
  +
     <target name="cleanup"> 
       <delete file="move.filterset.tmp"/>
       <delete file="move.filterchain.tmp"/>
  +    <delete dir="A"/>
  +    <delete dir="E"/>
     </target>
   
   </project>
  
  
  
  1.6       +14 -1     ant/src/testcases/org/apache/tools/ant/taskdefs/MoveTest.java
  
  Index: MoveTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/MoveTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MoveTest.java	10 Feb 2003 14:14:45 -0000	1.5
  +++ MoveTest.java	19 May 2003 14:05:23 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -95,5 +95,18 @@
           File check  = new File(getProjectDir(), "expected/copy.filterset.filtered");
           assertTrue(tmp.exists());
           assertTrue(fileUtils.contentEquals(tmp, check));
  +    }
  +
  +    /** Bugzilla Report 11732 */
  +    public void testDirectoryRemoval() throws IOException {
  +        executeTarget("testDirectoryRemoval");
  +        assertTrue(!getProject().resolveFile("E/B/1").exists());
  +        assertTrue(getProject().resolveFile("E/C/2").exists());
  +        assertTrue(getProject().resolveFile("E/D/3").exists());
  +        assertTrue(getProject().resolveFile("A/B/1").exists());
  +        assertTrue(!getProject().resolveFile("A/C/2").exists());
  +        assertTrue(!getProject().resolveFile("A/D/3").exists());
  +        assertTrue(!getProject().resolveFile("A/C").exists());
  +        assertTrue(!getProject().resolveFile("A/D").exists());
       }
   }
  
  
  

Mime
View raw message