harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r479656 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
Date Mon, 27 Nov 2006 15:14:14 GMT
Author: pyang
Date: Mon Nov 27 07:14:13 2006
New Revision: 479656

URL: http://svn.apache.org/viewvc?view=rev&rev=479656
Log:
Apply test patch for HARMONY-2270 ([classlib][unit] tests.api.java.io.FileTest@test_mkdir
failes on win XP)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java?view=diff&rev=479656&r1=479655&r2=479656
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
Mon Nov 27 07:14:13 2006
@@ -1798,6 +1798,7 @@
         // Test make a long path
         String longDirName = "abcdefghijklmnopqrstuvwx";// 24 chars
         StringBuilder sb = new StringBuilder(dir + File.separator);
+        StringBuilder sb2 = new StringBuilder(dir + File.separator);
         while (dir.getCanonicalPath().length() < 256 - longDirName.length()) {
             sb.append(longDirName + File.separator);
             dir = new File(sb.toString());
@@ -1807,6 +1808,14 @@
         while (dir.getCanonicalPath().length() < 256) {
             sb.append(0);
             dir = new File(sb.toString());
+            assertTrue("mkdir " + dir.getCanonicalPath().length() + " failed",
+                    dir.mkdir() && dir.exists());
+            dir.deleteOnExit();
+        }
+        // Test make many paths
+        while (dir.getCanonicalPath().length() < 256) {
+            sb2.append(0);
+            dir = new File(sb2.toString());
             assertTrue("mkdir " + dir.getCanonicalPath().length() + " failed",
                     dir.mkdir() && dir.exists());
             dir.deleteOnExit();



Mime
View raw message