try to fix test issue

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896542 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-12-30 20:41:51 +00:00
parent 9de29ea3fc
commit e35347157d
1 changed files with 6 additions and 5 deletions

View File

@ -129,11 +129,12 @@ public class HPSFFileHandler extends POIFSFileHandler {
assumeFalse(EXCLUDES_HANDLE_ADD.contains(file.getParentFile().getName()+"/"+file.getName())); assumeFalse(EXCLUDES_HANDLE_ADD.contains(file.getParentFile().getName()+"/"+file.getName()));
try (UnsynchronizedByteArrayOutputStream bos = new UnsynchronizedByteArrayOutputStream()) { try (UnsynchronizedByteArrayOutputStream bos = new UnsynchronizedByteArrayOutputStream()) {
PrintStream psNew = new PrintStream(bos, true, "ISO-8859-1"); try (PrintStream psNew = new PrintStream(bos, true, "ISO-8859-1")) {
CopyCompare copyCompare = new CopyCompare(); CopyCompare copyCompare = new CopyCompare();
copyCompare.setOut(psNew); copyCompare.setOut(psNew);
CopyCompare.main(new String[]{file.getAbsolutePath(), copyOutput.get().getAbsolutePath()}); copyCompare.run(new String[]{file.getAbsolutePath(), copyOutput.get().getAbsolutePath()});
assertEquals("Equal" + NL, bos.toString(StandardCharsets.UTF_8)); assertEquals("Equal" + NL, bos.toString(StandardCharsets.UTF_8));
}
} }
} }