testcases for bug 23094
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f120f93536
commit
70a2698295
@ -297,6 +297,14 @@ public class TestFormulaParser extends TestCase {
|
||||
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);
|
||||
|
@ -110,6 +110,18 @@ extends TestCase {
|
||||
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user