Skip to content

Commit

Permalink
Ensure ISO-LATIN used when comparing names in 'testArbitraryHeaderDat…
Browse files Browse the repository at this point in the history
…aIsKeptAfterExport'
  • Loading branch information
Col-E committed Jul 17, 2024
1 parent 996eb86 commit 62a5bd3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ void testArbitraryHeaderDataIsKeptAfterExport() throws IOException {
for (int i = 0; i < 4; i++) {
assertEquals(zipBytesHead[i], outBytesHead[i], "Mismatch where normal ZIP is supposed to be appended");
}
String zipHeadName = new String(zipBytesHead).substring(30, 47);
String outHeadName = new String(outBytesHead).substring(30, 47);
assertEquals(outHeadName, "SomethingElse.bin", "Mismatch in outputs expected first ZIP entry name");
String zipHeadName = new String(zipBytesHead, StandardCharsets.ISO_8859_1).substring(30, 47);
String outHeadName = new String(outBytesHead, StandardCharsets.ISO_8859_1).substring(30, 47);
assertEquals("SomethingElse.bin", outHeadName, "Mismatch in outputs expected first ZIP entry name");
assertEquals(zipHeadName, outHeadName, "Mismatch where normal ZIP entry for 'SomethingElse.bin' is supposed to be");
}
}

0 comments on commit 62a5bd3

Please sign in to comment.