mirror of https://github.com/apache/poi.git
tweak to use platform line separator so tests can pass on Windows as well as Linux.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795026 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
674d6ac2c9
commit
4719194b79
|
@ -44,6 +44,8 @@ import org.junit.Assume;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class HPSFFileHandler extends POIFSFileHandler {
|
public class HPSFFileHandler extends POIFSFileHandler {
|
||||||
|
private static final String NL = System.getProperty("line.separator");
|
||||||
|
|
||||||
private static File copyOutput = null;
|
private static File copyOutput = null;
|
||||||
|
|
||||||
static final Set<String> EXCLUDES_HANDLE_ADD = unmodifiableHashSet(
|
static final Set<String> EXCLUDES_HANDLE_ADD = unmodifiableHashSet(
|
||||||
|
@ -108,7 +110,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
|
||||||
try {
|
try {
|
||||||
System.setOut(psNew);
|
System.setOut(psNew);
|
||||||
CopyCompare.main(new String[]{file.getAbsolutePath(), copyOutput.getAbsolutePath()});
|
CopyCompare.main(new String[]{file.getAbsolutePath(), copyOutput.getAbsolutePath()});
|
||||||
assertEquals("Equal\n", new String(bos.toByteArray(), Charset.forName("UTF-8")));
|
assertEquals("Equal" + NL, new String(bos.toByteArray(), Charset.forName("UTF-8")));
|
||||||
} finally {
|
} finally {
|
||||||
System.setOut(ps);
|
System.setOut(ps);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue