]> source.dussan.org Git - poi.git/commitdiff
Add test to show that bug #43251 is already fixed
authorNick Burch <nick@apache.org>
Wed, 19 Mar 2008 12:01:32 +0000 (12:01 +0000)
committerNick Burch <nick@apache.org>
Wed, 19 Mar 2008 12:01:32 +0000 (12:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@638804 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/data/43251.xls [new file with mode: 0644]
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

diff --git a/src/testcases/org/apache/poi/hssf/data/43251.xls b/src/testcases/org/apache/poi/hssf/data/43251.xls
new file mode 100644 (file)
index 0000000..abc476a
Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/43251.xls differ
index e7eff83e627a2f9f2d45e50696791022d479c7b3..b534a8bbfb5bc4dd4cc5f52e1fe784009405c4cd 100644 (file)
@@ -1136,6 +1136,20 @@ extends TestCase {
         //assertEquals("=CHOOSE(2,A2,A3,A4)", c2.getCellFormula());
     }
     
+    /**
+     * Something up with the FileSharingRecord
+     */
+    public void test43251() throws Exception {
+        FileInputStream in = new FileInputStream(new File(cwd, "43251.xls"));
+        
+        // Used to blow up with an IllegalArgumentException
+        //  when creating a FileSharingRecord
+        HSSFWorkbook wb = new HSSFWorkbook(in);
+        in.close();
+        
+        assertEquals(1, wb.getNumberOfSheets());
+    }
+    
     /**
      * Crystal reports generates files with short 
      *  StyleRecords, which is against the spec