summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Woolsey <gwoolsey@apache.org>2017-05-12 22:13:30 +0000
committerGreg Woolsey <gwoolsey@apache.org>2017-05-12 22:13:30 +0000
commit4719194b791058176f83e288fcf997f172267697 (patch)
tree74f71f12f4884f630eba14ebe9c2bdd27f299a3b
parent674d6ac2c9d4a5267b748b24d45a140881e68d7d (diff)
downloadpoi-4719194b791058176f83e288fcf997f172267697.tar.gz
poi-4719194b791058176f83e288fcf997f172267697.zip
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
-rw-r--r--src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
index 77ad5ef061..5fe154c1d9 100644
--- a/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
@@ -44,6 +44,8 @@ import org.junit.Assume;
import org.junit.Test;
public class HPSFFileHandler extends POIFSFileHandler {
+ private static final String NL = System.getProperty("line.separator");
+
private static File copyOutput = null;
static final Set<String> EXCLUDES_HANDLE_ADD = unmodifiableHashSet(
@@ -108,7 +110,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
try {
System.setOut(psNew);
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 {
System.setOut(ps);
}