diff options
author | Dominik Stadler <centic@apache.org> | 2015-07-16 03:42:17 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2015-07-16 03:42:17 +0000 |
commit | da41662294bc455059e5b1646f786f2925575b2a (patch) | |
tree | a23bb2a59cab4d8c29d2ef4ab7a2288d6415708a /src/testcases | |
parent | 31bc9eb19093b5e7163090845a7e2235ed8a2ffd (diff) | |
download | poi-da41662294bc455059e5b1646f786f2925575b2a.tar.gz poi-da41662294bc455059e5b1646f786f2925575b2a.zip |
More coverage of class EscherDump
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r-- | src/testcases/org/apache/poi/ddf/TestEscherDump.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ddf/TestEscherDump.java b/src/testcases/org/apache/poi/ddf/TestEscherDump.java index 5d05bb2f0e..276c15f414 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherDump.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherDump.java @@ -17,8 +17,13 @@ package org.apache.poi.ddf; +import static org.junit.Assert.*; + import java.io.ByteArrayInputStream; +import org.apache.poi.POIDataSamples; +import org.apache.poi.hssf.HSSFTestDataSamples; +import org.apache.poi.util.IOUtils; import org.junit.Test; public class TestEscherDump { @@ -36,4 +41,18 @@ public class TestEscherDump { public void testWithData() throws Exception { new EscherDump().dumpOld(8, new ByteArrayInputStream(new byte[] { 00, 00, 00, 00, 00, 00, 00, 00 }), System.out); } + + @Test + public void testWithSamplefile() throws Exception { + //InputStream stream = HSSFTestDataSamples.openSampleFileStream(") + byte[] data = POIDataSamples.getDDFInstance().readFile("Container.dat"); + new EscherDump().dump(data.length, data, System.out); + //new EscherDump().dumpOld(data.length, new ByteArrayInputStream(data), System.out); + + data = new byte[2586114]; + int bytes = IOUtils.readFully(HSSFTestDataSamples.openSampleFileStream("44593.xls"), data); + assertTrue(bytes != -1); + //new EscherDump().dump(bytes, data, System.out); + //new EscherDump().dumpOld(bytes, new ByteArrayInputStream(data), System.out); + } } |