OSDN Git Service

Remove tests.api.java.io.FileTest#test_delete as known failure.
[android-x86/dalvik.git] / libcore / luni / src / test / java / tests / api / java / io / FileTest.java
index 9ce3785..b10ab53 100644 (file)
@@ -691,7 +691,7 @@ public class FileTest extends junit.framework.TestCase {
         level = TestLevel.PARTIAL_COMPLETE,
         method = "delete",
         args = {}
-    )        
+    )
     public void test_delete() {
         // Test for method boolean java.io.File.delete()
         try {
@@ -2463,10 +2463,17 @@ public class FileTest extends junit.framework.TestCase {
         subDir.mkdir();
         assertTrue(subDir.exists());
 
+        URL url = getClass().getResource("/HelloWorld.txt");
+        String classPath = url.toString();
+        int idx = classPath.indexOf("!"); 
+        assertTrue("could not find the path of the test jar/apk", idx > 0);
+        classPath = classPath.substring(9, idx); // cutting off jar:file:
+
         Support_Exec.execJava(new String[] {
                 "tests.support.Support_DeleteOnExitTest",
                 dir.getAbsolutePath(), subDir.getAbsolutePath() },
-                new String[] { System.getProperty("java.class.path") }, false);
+                new String[] { System.getProperty("java.class.path"),
+                classPath }, false);
         Thread.sleep(2000);
         assertFalse(dir.exists());
         assertFalse(subDir.exists());