poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r620341 - in /poi/trunk/src/testcases/org/apache/poi/hssf: data/42564.xls usermodel/TestBugs.java
Date Sun, 10 Feb 2008 21:54:15 GMT
Author: nick
Date: Sun Feb 10 13:54:13 2008
New Revision: 620341

URL: http://svn.apache.org/viewvc?rev=620341&view=rev
Log:
Test for bug #42564 - appears to already be fixed

Added:
    poi/trunk/src/testcases/org/apache/poi/hssf/data/42564.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/42564.xls
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/data/42564.xls?rev=620341&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/src/testcases/org/apache/poi/hssf/data/42564.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=620341&r1=620340&r2=620341&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 Sun Feb 10 13:54:13
2008
@@ -1010,6 +1010,26 @@
         assertTrue("No Exceptions while reading file", true);
     }
 
+    /**
+     * Bug 42564: Some files from Acess were giving a RecordFormatException
+     *  when reading the BOFRecord
+     */
+    public void test42564() throws Exception {
+        FileInputStream in = new FileInputStream(new File(cwd, "42564.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);
+    }
+
 	/**
 	 * Bug 42618: RecordFormatException reading a file containing
 	 * 	=CHOOSE(2,A2,A3,A4)



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


Mime
View raw message