You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2015/07/16 05:42:17 UTC
svn commit: r1691311 -
/poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java
Author: centic
Date: Thu Jul 16 03:42:17 2015
New Revision: 1691311
URL: http://svn.apache.org/r1691311
Log:
More coverage of class EscherDump
Modified:
poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java
Modified: poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java?rev=1691311&r1=1691310&r2=1691311&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherDump.java Thu Jul 16 03:42:17 2015
@@ -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);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org