]> source.dussan.org Git - poi.git/commitdiff
new testcase
authorAvik Sengupta <avik@apache.org>
Tue, 31 May 2005 18:41:19 +0000 (18:41 +0000)
committerAvik Sengupta <avik@apache.org>
Tue, 31 May 2005 18:41:19 +0000 (18:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353703 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java

index 525503cfa1fc13cc23d9def78de84635e048a12e..810109add1191f6a8d2cc7d6c3c2a3c04da94c39 100644 (file)
@@ -58,5 +58,22 @@ public class TestUnfixedBugs extends TestCase {
        HSSFWorkbook wb = new HSSFWorkbook(in);
        assertTrue("Read book fine!" , true);
    }
-        
+       
+        /* cell with formula becomes null on cloning a sheet*/
+        public void test35084() {
+       
+       HSSFWorkbook wb = new HSSFWorkbook();
+       HSSFSheet s =wb.createSheet("Sheet1");
+       HSSFRow r = s.createRow(0);
+       r.createCell((short)0).setCellValue(1);
+       r.createCell((short)1).setCellFormula("A1*2");
+       HSSFSheet s1 = wb.cloneSheet(0);
+       r=s1.getRow(0);
+       assertEquals("double" ,r.getCell((short)0).getNumericCellValue(),(double)1,0); //sanity check, pass
+       assertNotNull(r.getCell((short)1)); //Fails
+       assertEquals("formula", r.getCell((short)1).getCellFormula(), "A1*2"); //Fails
+       
+       
+       
+    }
 }