You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by av...@apache.org on 2003/09/23 20:42:41 UTC
cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel TestBugs.java
avik 2003/09/23 11:42:40
Modified: src/testcases/org/apache/poi/hssf/model Tag: REL_2_BRANCH
TestFormulaParser.java
src/testcases/org/apache/poi/hssf/usermodel Tag:
REL_2_BRANCH TestBugs.java
Log:
testcases for bug 23094
Revision Changes Path
No revision
No revision
1.7.2.2 +8 -0 jakarta-poi/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
Index: TestFormulaParser.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -r1.7.2.1 -r1.7.2.2
--- TestFormulaParser.java 23 Aug 2003 19:40:05 -0000 1.7.2.1
+++ TestFormulaParser.java 23 Sep 2003 18:42:40 -0000 1.7.2.2
@@ -297,6 +297,14 @@
assertEquals("FOO", tname.toFormulaString(w));
}
+ public void testEmbeddedSlash() {
+ FormulaParser fp = new FormulaParser("HYPERLINK(\"http://www.jakarta.org\",\"Jakarta\");",null);
+ fp.parse();
+ Ptg[] ptg = fp.getRPNPtg();
+ assertTrue("first ptg is string",ptg[0] instanceof StringPtg);
+ assertTrue("second ptg is string",ptg[1] instanceof StringPtg);
+
+ }
public static void main(String [] args) {
System.out.println("Testing org.apache.poi.hssf.record.formula.FormulaParser");
junit.textui.TestRunner.run(TestFormulaParser.class);
No revision
No revision
1.1.2.4 +12 -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.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- TestBugs.java 23 Aug 2003 18:54:28 -0000 1.1.2.3
+++ TestBugs.java 23 Sep 2003 18:42:40 -0000 1.1.2.4
@@ -110,6 +110,18 @@
}
+ public void test23094() throws Exception {
+ File file = File.createTempFile("test23094",".xls");
+ FileOutputStream out = new FileOutputStream(file);
+ HSSFWorkbook wb = new HSSFWorkbook();
+ HSSFSheet s = wb.createSheet();
+ HSSFRow r = s.createRow(0);
+ r.createCell((short)0).setCellFormula("HYPERLINK( \"http://jakarta.apache.org\", \"Jakarta\" )");
+ assertTrue("No Exception expected",true);
+ wb.write(out);
+ out.close();
+ }
+
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org