misc
[phpeclipse.git] / net.sourceforge.phpeclipse.tests / src / net / sourceforge / phpeclipse / tests / parser / PHPManualTestCase.java
index fb231ff..a32f03d 100644 (file)
@@ -1,6 +1,6 @@
 package net.sourceforge.phpeclipse.tests.parser;
 /*******************************************************************************
- * Copyright (c) 2002 Klaus Hartlage - www.eclipseproject.de All rights
+ * Copyright (c) 2002 www.phpeclipse.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
@@ -19,6 +19,17 @@ public class PHPManualTestCase extends AbstractCompilerTest {
    * Test the PHP Parser with different PHP snippets
    */
   public void testPHPParser() {
+    checkPHP("if ((eregi(\"<[^>]*script*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*object*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*iframe*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*applet*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*meta*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*style*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"<[^>]*form*\\\"?[^>]*>\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"\\([^>]*\\\"?[^)]*\\)\", $secvalue)) ||\r\n" + 
+               "       (eregi(\"\\\"\", $secvalue))) {\r\n" + 
+               "   die (\"<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\\\"javascript:history.go(-1)\\\"><b>Go Back</b></a> ]\");\r\n" + 
+               "    }");
     checkPHP("function foo()" + "{" + "    echo \"In foo()<br>\\n\";" + "}"
         + "" + "function bar($arg = '')" + "{"
         + "    echo \"In bar(); argument was '$arg'.<br>\\n\";" + "}" + ""