]> source.dussan.org Git - poi.git/commitdiff
test for parsing strings, submitted by Werner Froidevaux
authorAvik Sengupta <avik@apache.org>
Tue, 28 May 2002 12:41:17 +0000 (12:41 +0000)
committerAvik Sengupta <avik@apache.org>
Tue, 28 May 2002 12:41:17 +0000 (12:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352654 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/record/formula/TestFormulaParser.java

index 112ee9f4ba2626524da81b7c85147d5b0c2095a3..84dd8376c80432e80da393983d0d6d01859f813b 100644 (file)
@@ -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);