ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Meade" <eme...@geekfarm.org>
Subject [Patch] PathTest.java
Date Sun, 01 Oct 2000 23:15:54 GMT
Turns out there where a few instances where Windows fails in PathTest.
I pretty much did the same thing in this patch as I did for
IntrospectionHelperTest.  All of the test work after this patch, so
maybe it is okay to fix the errors this way after all..?

Erik Meade
----

Index: PathTest.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/testcases/org/apache/tools/ant/types/PathTes
t.java,v
retrieving revision 1.6
diff -u -r1.6 PathTest.java
--- PathTest.java	2000/09/18 14:04:59	1.6
+++ PathTest.java	2000/10/01 23:05:36
@@ -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@megabit.net">Stefan Bodewig</a>
  */

 public class PathTest extends TestCase {
@@ -92,9 +92,9 @@
             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");
         l = p.list();
@@ -103,9 +103,9 @@
             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");
         l = p.list();
@@ -115,16 +115,16 @@
             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");
         l = p.list();
         if (isUnixStyle) {
             assertEquals("no drives on Unix", 2, l.length);
-            assert("c resolved relative to project\'s basedir",
+            assert("c resolved relative to project\'s basedir",
                    l[0].endsWith("/c"));
             assertEquals("/test", l[1]);
         } else {
@@ -136,7 +136,7 @@
         l = p.list();
         if (isUnixStyle) {
             assertEquals("no drives on Unix", 2, l.length);
-            assert("c resolved relative to project\'s basedir",
+            assert("c resolved relative to project\'s basedir",
                    l[0].endsWith("/c"));
             assertEquals("/test", l[1]);
         } else {
@@ -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