From: Avik Sengupta Date: Tue, 28 May 2002 12:41:17 +0000 (+0000) Subject: test for parsing strings, submitted by Werner Froidevaux X-Git-Tag: REL_1_10~344 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3234ce48d57222043d1fb8aec33d81315a5f30d9;p=poi.git test for parsing strings, submitted by Werner Froidevaux git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352654 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/hssf/record/formula/TestFormulaParser.java b/src/testcases/org/apache/poi/hssf/record/formula/TestFormulaParser.java index 112ee9f4ba..84dd8376c8 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/TestFormulaParser.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/TestFormulaParser.java @@ -54,6 +54,16 @@ public class TestFormulaParser extends TestCase { assertTrue("two tokens expected, got "+ptgs.length,ptgs.length == 2); } + public void testFormulaWithString() { + Ptg[] ptgs; + FormulaParser fp; + fp = new FormulaParser("\"hello\" & \"world\" ;"); + fp.parse(); + ptgs = fp.getRPNPtg(); + assertTrue("three token expected, got " + ptgs.length, ptgs.length == 3); + } + + public static void main(String [] args) { System.out.println("Testing org.apache.poi.hssf.record.formula.FormulaParser"); junit.textui.TestRunner.run(TestFormulaParser.class);