Skip to content

Commit

Permalink
Fix the test testCompressStreamToZip in ZipManagerTest by replacing a…
Browse files Browse the repository at this point in the history
…ll the File.separatorChar by '/' as the path separator of the entries in ZipFile are normalized (id est / as path separator)
  • Loading branch information
mmoqui committed Nov 26, 2012
1 parent 706d6b9 commit 7bbc619
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -110,8 +110,7 @@ public void testCompressStreamToZip() throws Exception {
int result = ZipManager.getNbFiles(new File(outfilename));
assertEquals(1, result);
ZipFile zipFile = new ZipFile(file);
assertNotNull(zipFile.getEntry(File.separatorChar + "dir1" + File.separatorChar + "dir2"
+ File.separatorChar + "FrenchScrum.odp"));
assertNotNull(zipFile.getEntry("/dir1/dir2/FrenchScrum.odp"));
zipFile.close();
}

Expand Down Expand Up @@ -188,4 +187,4 @@ public void testGetNbFiles() throws Exception {
int result = ZipManager.getNbFiles(file);
assertEquals(5, result);
}
}
}

0 comments on commit 7bbc619

Please sign in to comment.