poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r615259 - in /poi/trunk/src/testcases/org/apache/poi/hssf: data/SimpleWithChoose.xls usermodel/TestBugs.java
Date Fri, 25 Jan 2008 16:33:59 GMT
Author: nick
Date: Fri Jan 25 08:33:59 2008
New Revision: 615259

URL: http://svn.apache.org/viewvc?rev=615259&view=rev
Log:
Add a test to show the bug #42618 appears to be incorrect

Added:
    poi/trunk/src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls   (with props)
Modified:
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

Added: poi/trunk/src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls?rev=615259&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls
------------------------------------------------------------------------------
    svn:executable = *

Propchange: poi/trunk/src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=615259&r1=615258&r2=615259&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Fri Jan 25 08:33:59
2008
@@ -1008,9 +1008,27 @@
 
         wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
         assertTrue("No Exceptions while reading file", true);
-
     }
 
+	/**
+	 * Bug 42618: RecordFormatException reading a file containing
+	 * 	=CHOOSE(2,A2,A3,A4)
+	 */
+    public void test42618() throws Exception {
+        FileInputStream in = new FileInputStream(new File(cwd, "SimpleWithChoose.xls"));
+        HSSFWorkbook wb = new HSSFWorkbook(in);
+        in.close();
+
+        assertTrue("No Exceptions while reading file", true);
+
+        //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);
+    }
 }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message