poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel TestBugs.java
Date Thu, 30 Oct 2003 17:20:26 GMT
avik        2003/10/30 09:20:26

  Modified:    src/testcases/org/apache/poi/hssf/usermodel Tag:
                        REL_2_BRANCH TestBugs.java
  Log:
  testcase for bug 18800
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.14  +18 -0     jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
  
  Index: TestBugs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- TestBugs.java	30 Oct 2003 16:23:42 -0000	1.1.2.13
  +++ TestBugs.java	30 Oct 2003 17:20:26 -0000	1.1.2.14
  @@ -57,6 +57,8 @@
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
  +import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
   import java.io.IOException;
   import java.util.Date;
   
  @@ -388,6 +390,22 @@
               }
           }
           assertTrue("No Exceptions while reading file", true);
  +    }
  +    
  +     public void test18800() throws Exception {
  +        ByteArrayOutputStream out = new ByteArrayOutputStream();
  +        HSSFWorkbook book = new HSSFWorkbook();
  +        book.createSheet("TEST");
  +        HSSFSheet sheet = book.cloneSheet(0);
  +        book.setSheetName(1,"CLONE");
  +        sheet.createRow(0).createCell((short)0).setCellValue("Test");
  +        book.write(out);
  +        
  +        book = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
  +        sheet = book.getSheet("CLONE");
  +        HSSFRow row = sheet.getRow(0);
  +        HSSFCell cell = row.getCell((short)0);
  +        System.out.println(cell.getStringCellValue());
       }
   }
   
  
  
  

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


Mime
View raw message