From a0d0fd14ef7b8df48b66b31b41ed0e0ecbcb2584 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Wed, 19 Mar 2008 11:57:38 +0000 Subject: [PATCH] Added test to show that bug #41546 is already fixed. Also rename a test file to be more consistent git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@638803 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/data/41546.xls | Bin 0 -> 18432 bytes .../poi/hssf/data/{Bug44593.xls => 44593.xls} | Bin .../apache/poi/hssf/usermodel/TestBugs.java | 24 +++++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/testcases/org/apache/poi/hssf/data/41546.xls rename src/testcases/org/apache/poi/hssf/data/{Bug44593.xls => 44593.xls} (100%) diff --git a/src/testcases/org/apache/poi/hssf/data/41546.xls b/src/testcases/org/apache/poi/hssf/data/41546.xls new file mode 100644 index 0000000000000000000000000000000000000000..1332f3eef569b779a064ae6af2f395b83ccd25b3 GIT binary patch literal 18432 zcmeHPYitx%6#iyATedvgBBfGT#}*=#7F$=8SfP!tXpAV}D``!6*orSO1QYz_*wsJA zHvzMW(HMz|F;P?m6G>cRjA&{wCjQXGq(JniijPE%x_;-(%vJ5lbsjgTG64s13<2w$Bgx_277^B;BBP*rv#&vj~B@3>UIC zjok}BoAgPM%@lALDeSfnump}U58wgVz^2Xj-0hsHbcJriIx7VWMILy|*{Z<{lupOF zx@C=8&eZZvjsp9&T#iO;w64dt%U8B9qZG7od#X?Mp475c%jqmF?9(}4tE3wa4pP7L z@H29#*SN@7ouypKL04%{*S@X~yWZ^bbS&!Z7nkGcq^ht}Q-z&sw#UX)$TnN!Y>!Rk z#@E?4!Mu781>S1G`Q=3_P9)!!m##c{NmqD2 zds({;8DygxF)ONeDcW%nFzC>FyQA(0ogTmIZ%;+g+S#g|zCkBzFTo;yI5j-4-3d=> zcOo--(SggN&bSd3^ZwL`j0SppD^4%LVswX`2D)Xx6+vv~9L&Zno`Cbcom|v2u+VQ0 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JbB*q}`OuUdjrcxy8 z5-Jcg`KS4=WM%$VmUrn_<3!&igMdN6AYc$M2p9wm0tNwtfI+|@U=T0}7z9op0pZj_ zy5+sQ%`DtrzAGubT>h^Eze}gTJ`>(9oL-2z{Ge?Hvy3;eZe*7C{lQP=n%JJrEaUva zxBNy~euRv<%=4Iq;Gf4V<9{)?`fWB%I>QL8#%6xD!ok(p#Ci)J;%Zc%_`QEC*kn0| z>N9dQ0YxowjaPZ)=gx~i%Xd6v-2?d*>i^!Ld(!n}q{{wfJE}1t-&xUs6|39me+%x# z`cvEv{uc^M&Y=JUF^LTav}W-;&Sd* vyZ`FC?Efly*r3}mq({KXZO^h(z`t4c#P=`F(@g>P)$af4`isv$oBjU-GFsRw literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/data/Bug44593.xls b/src/testcases/org/apache/poi/hssf/data/44593.xls similarity index 100% rename from src/testcases/org/apache/poi/hssf/data/Bug44593.xls rename to src/testcases/org/apache/poi/hssf/data/44593.xls diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index f06f591c4..e7eff83e6 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -1034,6 +1034,28 @@ extends TestCase { assertTrue("No Exceptions while reading file", true); } + /** + * Bug 41546: Constructing HSSFWorkbook is failed, + * Unknown Ptg in Formula: 0x1a (26) + */ + public void test41546() throws Exception { + FileInputStream in = new FileInputStream(new File(cwd, "41546.xls")); + HSSFWorkbook wb = new HSSFWorkbook(in); + in.close(); + + assertTrue("No Exceptions while reading file", true); + assertEquals(1, wb.getNumberOfSheets()); + + //serialize and read again + ByteArrayOutputStream out = new ByteArrayOutputStream(); + wb.write(out); + out.close(); + + wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray())); + assertTrue("No Exceptions while reading file", true); + assertEquals(1, wb.getNumberOfSheets()); + } + /** * Bug 42564: Some files from Access were giving a RecordFormatException * when reading the BOFRecord @@ -1157,7 +1179,7 @@ extends TestCase { * probably due to dropdowns */ public void test44593() throws Exception { - FileInputStream in = new FileInputStream(new File(cwd, "Bug44593.xls")); + FileInputStream in = new FileInputStream(new File(cwd, "44593.xls")); // Used to blow up with an IllegalArgumentException // when creating a DVRecord