From 3234ce48d57222043d1fb8aec33d81315a5f30d9 Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Tue, 28 May 2002 12:41:17 +0000 Subject: [PATCH] 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 --- .../poi/hssf/record/formula/TestFormulaParser.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.39.5