harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r451102 - in /incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip: GZIPOutputStreamTest.java ZipFileTest.java
Date Fri, 29 Sep 2006 03:23:16 GMT
Author: pyang
Date: Thu Sep 28 20:23:15 2006
New Revision: 451102

URL: http://svn.apache.org/viewvc?view=rev&rev=451102
Log:
Apply patch for HARMONY-1617([classlib][archive]temp files should be deleted in test)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java?view=diff&rev=451102&r1=451101&r2=451102
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
Thu Sep 28 20:23:15 2006
@@ -166,11 +166,12 @@
 		try {
 			File dFile = new File("GZIPOutCon.txt");
 			dFile.delete();
-			/*
-			 * File dFile2 = new File("GZIPOutFinish.txt"); dFile2.delete();
-			 * File dFile3 = new File("GZIPOutClose.txt"); dFile3.delete(); File
-			 * dFile4 = new File("GZIPOutWrite.txt"); dFile4.delete();
-			 */
+			File dFile2 = new File("GZIPOutFinish.txt"); 
+            dFile2.delete();
+            File dFile3 = new File("GZIPOutWrite.txt"); 
+            dFile3.delete();
+            File dFile4 = new File("GZIPOutClose2.txt"); 
+            dFile4.delete(); 
 		} catch (SecurityException e) {
 			fail("Cannot delete file for security reasons");		
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java?view=diff&rev=451102&r1=451101&r2=451102
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
Thu Sep 28 20:23:15 2006
@@ -287,6 +287,19 @@
                 // Note zfile is a user-defined zip file used by other tests and
 				// should not be deleted
 				zfile.close();
+                tempFileName = System.getProperty("user.dir");
+                String separator = System.getProperty("file.separator");
+                if (tempFileName.charAt(tempFileName.length() - 1) == separator
+                        .charAt(0)) {
+                    tempFileName = Support_PlatformFile.getNewPlatformFile(
+                            tempFileName, "gabba.zip");
+                } else {
+                    tempFileName = Support_PlatformFile.getNewPlatformFile(
+                            tempFileName + separator, "gabba.zip");
+                }
+
+                File f = new File(tempFileName);
+                f.delete();
             }
 		} catch (Exception e) {
 		}



Mime
View raw message