misc parser changes
[phpeclipse.git] / net.sourceforge.phpeclipse.tests / src / net / sourceforge / phpeclipse / tests / parser / PHPParserTestCase.java
index d7759ea..c8b0443 100644 (file)
@@ -6,7 +6,6 @@ package net.sourceforge.phpeclipse.tests.parser;
  * distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html
  ******************************************************************************/
 import net.sourceforge.phpdt.core.tests.util.AbstractCompilerTest;
-import net.sourceforge.phpdt.internal.compiler.parser.Parser;
 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
 /**
  * Tests the php parser
@@ -20,7 +19,19 @@ public class PHPParserTestCase extends AbstractCompilerTest {
    * Test the PHP Parser with different PHP snippets
    */
   public void testPHPParser() {
-    checkHTML("<?php echo $bgcolor2?>");
+    checkHTML("<?php if ($a==$b) {\n" +
+               "}\n" +
+               ""+
+               "?> ");
+    checkHTML("<?php if ($a==$b) {?>\n" +
+               "<b>test <?php echo \"test\";?> me</b>\n" +
+               "<?php } \n" +
+               "echo $bgcolor2 ?>");
+   
+    checkHTML("<?php echo $bgcolor2 ?>");
+    checkPHP("function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)\r\n" + 
+               "{ static $drop_char_match = array(\'^\', \'$\'); }");
+    
     checkPHP("if ($topic<1) { $topic = 1;}");
     checkPHP("$this->result_field_names[$result_id][] = odbc_field_name($result_id, $i);");
     checkPHP("$db->sql_query($sql);");