X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java b/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java index b566bf6..28f2a6e 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java @@ -1,11 +1,12 @@ package test; + /********************************************************************** -Copyright (c) 2002 Klaus Hartlage - www.eclipseproject.de -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html -**********************************************************************/ + Copyright (c) 2002 Klaus Hartlage - www.eclipseproject.de + All rights reserved. This program and the accompanying materials + are made available under the terms of the Common Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/cpl-v10.html + **********************************************************************/ import org.eclipse.core.runtime.CoreException; @@ -31,6 +32,9 @@ public class PHPParserTestCase2 extends TestCase { */ public void testPHPParser() { //checkHTML(new File("class.adm_gestuser.php")); + checkHTML(""); + checkHTML(""); checkHTML("" + "\n dfgdfgfdfg" + "\n" + @@ -108,7 +112,7 @@ public class PHPParserTestCase2 extends TestCase { checkPHP("$AllowableHTML = array(\"b\"=>1,\n \"i\"=>1);"); checkPHP("if ($term{0}!=$firstChar) {}"); checkPHP( - "echo \"
\"._NOADMINYET.\"


\"\n" + "echo \"
\"._NOADMINYET.\"


\"\n" + ".\"
\"\n" + ".\"\"._NICKNAME.\":\"\n" + ";"); @@ -116,7 +120,7 @@ public class PHPParserTestCase2 extends TestCase { checkPHP("if ($arrAtchCookie[1]==0 && $IdAtchPostId!=null){ } "); checkPHP("$arrAtchCookie[1] -= filesize(realpath($AtchTempDir).\"/\".$xattachlist)/ 1024; "); checkPHP( - "if (!isset($message)){ \n" + "if (!isset($message)){ \n" + "$message = $myrow[post_text];\n" + "$message = eregi_replace(\"\\[addsig]\", \"\\n-----------------\\n\" . $myrow[user_sig], $message); \n" + "$message = str_replace(\"
\", \"\\n\", $message); \n" @@ -137,6 +141,7 @@ public class PHPParserTestCase2 extends TestCase { } } + private void checkHTML(String strEval) { try { System.out.println("strEval = " + strEval); @@ -149,7 +154,7 @@ public class PHPParserTestCase2 extends TestCase { } - private void checkHTML(File strEval) { + private void checkHTML(File strEval) { try { System.out.println("strEval = " + strEval.toString()); parser.htmlParserTester(strEval); @@ -160,6 +165,7 @@ public class PHPParserTestCase2 extends TestCase { } } + /** * The JUnit setup method */