ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/types PathTest.java
Date Wed, 04 Oct 2000 09:46:05 GMT
bodewig     00/10/04 02:46:04

  Modified:    src/testcases/org/apache/tools/ant
                        IntrospectionHelperTest.java
               src/testcases/org/apache/tools/ant/taskdefs CopydirTest.java
                        CopyfileTest.java DeleteTest.java
               src/testcases/org/apache/tools/ant/types PathTest.java
  Log:
  Fixed some testcases:
  
  (1) make the Path tests work on Windows even if not working on C:
  Submitted by:	Erik Meade <emeade@geekfarm.org>
  
  (2) Take care of deprecation warnings and added functionality for some
  of the file handling tasks.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
  
  Index: IntrospectionHelperTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IntrospectionHelperTest.java	2000/09/18 14:04:58	1.3
  +++ IntrospectionHelperTest.java	2000/10/04 09:46:01	1.4
  @@ -62,7 +62,7 @@
   /**
    * JUnit 3 testcases for org.apache.tools.ant.IntrospectionHelper.
    *
  - * @author Stefan Bodewig <a href="mailto:stefan.bodewig@megabit.net">stefan.bodewig@megabit.net</a>

  + * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
    */
   
   public class IntrospectionHelperTest extends TestCase {
  @@ -409,7 +409,7 @@
           if (isUnixStyle) { 
               assertEquals("/tmp/2", f.getAbsolutePath());
           } else {
  -            assertEquals("c:\\tmp\\2", f.getAbsolutePath().toLowerCase());
  +            assertEquals(":\\tmp\\2", f.getAbsolutePath().toLowerCase().substring(1));
           }
       }
   
  
  
  
  1.2       +1 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopydirTest.java
  
  Index: CopydirTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopydirTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopydirTest.java	2000/09/20 13:38:50	1.1
  +++ CopydirTest.java	2000/10/04 09:46:02	1.2
  @@ -80,7 +80,7 @@
       }
   
       public void test4() { 
  -        expectLog("test4", "Warning: src == dest");
  +        expectLog("test4", "DEPRECATED - The copydir task is deprecated.  Use copy instead.Warning:
src == dest");
       }
       
       public void test5() { 
  
  
  
  1.2       +1 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopyfileTest.java
  
  Index: CopyfileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopyfileTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopyfileTest.java	2000/09/20 13:38:50	1.1
  +++ CopyfileTest.java	2000/10/04 09:46:02	1.2
  @@ -80,7 +80,7 @@
       }
   
       public void test4() { 
  -        expectLog("test4", "Warning: src == dest");
  +        expectLog("test4", "DEPRECATED - The copyfile task is deprecated.  Use copy instead.Warning:
src == dest");
       }
   
       public void test5() { 
  
  
  
  1.2       +4 -3      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/DeleteTest.java
  
  Index: DeleteTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/DeleteTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeleteTest.java	2000/09/20 13:38:50	1.1
  +++ DeleteTest.java	2000/10/04 09:46:02	1.2
  @@ -75,9 +75,10 @@
           executeTarget("test2");
       }
   
  -    public void test3() { 
  -        expectBuildException("test3", "Not a directory");
  -    }
  +    // delete now handles files *and* directories --SB
  +//    public void test3() { 
  +//        expectBuildException("test3", "Not a directory");
  +//    }
   
       public void test4() { 
           executeTarget("test4");
  
  
  
  1.7       +10 -10    jakarta-ant/src/testcases/org/apache/tools/ant/types/PathTest.java
  
  Index: PathTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/types/PathTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PathTest.java	2000/09/18 14:04:59	1.6
  +++ PathTest.java	2000/10/04 09:46:04	1.7
  @@ -65,7 +65,7 @@
   /**
    * JUnit 3 testcases for org.apache.tools.ant.types.Path
    *
  - * @author <a href="mailto:stefan.bodewig@megabit.net">Stefan Bodewig</a> 
  + * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
    */
   
   public class PathTest extends TestCase {
  @@ -92,8 +92,8 @@
               assertEquals("/a", l[0]);
               assertEquals("/b", l[1]);
           } else {
  -            assertEquals("\\a", l[0]);
  -            assertEquals("\\b", l[1]);
  +            assertEquals(":\\a", l[0].substring(1));
  +            assertEquals(":\\b", l[1].substring(1));
           }        
   
           p = new Path(project, "\\a;\\b");
  @@ -103,8 +103,8 @@
               assertEquals("/a", l[0]);
               assertEquals("/b", l[1]);
           } else {
  -            assertEquals("\\a", l[0]);
  -            assertEquals("\\b", l[1]);
  +            assertEquals(":\\a", l[0].substring(1));
  +            assertEquals(":\\b", l[1].substring(1));
           }        
   
           p = new Path(project, "\\a;\\b:/c");
  @@ -115,9 +115,9 @@
               assertEquals("/b", l[1]);
               assertEquals("/c", l[2]);
           } else {
  -            assertEquals("\\a", l[0]);
  -            assertEquals("\\b", l[1]);
  -            assertEquals("\\c", l[2]);
  +            assertEquals(":\\a", l[0].substring(1));
  +            assertEquals(":\\b", l[1].substring(1));
  +            assertEquals(":\\c", l[2].substring(1));
           }        
   
           p = new Path(project, "c:\\test");
  @@ -154,7 +154,7 @@
               assertEquals("/a", l[0]);
           } else {
               assertEquals(1, l.length);
  -            assertEquals("\\a", l[0]);
  +            assertEquals(":\\a", l[0].substring(1));
           }
       }
   
  @@ -314,7 +314,7 @@
           if (isUnixStyle) {
               assertEquals("/a", l[0]);
           } else {
  -            assertEquals("\\a", l[0]);
  +            assertEquals(":\\a", l[0].substring(1));
           }
       }
   
  
  
  

Mime
View raw message