* 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
* 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);");