harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r791803 - in /harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip: ZipFileTest.java ZipOutputStreamTest.java
Date Tue, 07 Jul 2009 12:01:52 GMT
Author: odeakin
Date: Tue Jul  7 12:01:52 2009
New Revision: 791803

URL: http://svn.apache.org/viewvc?rev=791803&view=rev
Log:
Ensure these tests behave correctly on non-ASCII systems (e.g. zOS).

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

Modified: 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/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java?rev=791803&r1=791802&r2=791803&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
Tue Jul  7 12:01:52 2009
@@ -182,7 +182,7 @@
                 r = in.read(buf);
                 in.close();
                 assertEquals("incorrect contents",
-                             "This is also text", new String(buf, 0, r));
+                             "This is also text", new String(buf, 0, r, "UTF-8"));
 	}
 
     public void test_getEntryLjava_lang_String_Ex() throws IOException {
@@ -212,7 +212,7 @@
 			int r;
 			is.read(rbuf, 0, r = (int) zentry.getSize());
 			assertEquals("getInputStream read incorrect data", "This is text", new String(rbuf,
-					0, r));
+					0, r, "UTF-8"));
 		} catch (java.io.IOException e) {
 			fail("IOException during getInputStream");
 		} finally {

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java?rev=791803&r1=791802&r2=791803&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
Tue Jul  7 12:01:52 2009
@@ -67,7 +67,7 @@
         ZipEntry ze = new ZipEntry("testEntry");
         ze.setTime(System.currentTimeMillis());
         zos.putNextEntry(ze);
-        zos.write("Hello World".getBytes());
+        zos.write("Hello World".getBytes("UTF-8"));
         zos.closeEntry();
         assertTrue("closeEntry failed to update required fields",
                 ze.getSize() == 11 && ze.getCompressedSize() == 13);



Mime
View raw message