[limb-svn] r5880 - in 3.x/trunk/limb/wact: src/compiler/parser tests/cases/compiler/parser

svn at limb-project.com svn at limb-project.com
Sun May 13 16:04:03 MSD 2007


Author: serega
Date: 2007-05-13 16:04:03 +0400 (Sun, 13 May 2007)
New Revision: 5880
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5880

Modified:
   3.x/trunk/limb/wact/src/compiler/parser/WactHTMLParser.class.php
   3.x/trunk/limb/wact/tests/cases/compiler/parser/WactHTMLParserTest.class.php
Log:
-- better tests for WactHTMLParser

Modified: 3.x/trunk/limb/wact/src/compiler/parser/WactHTMLParser.class.php
===================================================================
--- 3.x/trunk/limb/wact/src/compiler/parser/WactHTMLParser.class.php	2007-05-13 11:22:40 UTC (rev 5879)
+++ 3.x/trunk/limb/wact/src/compiler/parser/WactHTMLParser.class.php	2007-05-13 12:04:03 UTC (rev 5880)
@@ -204,6 +204,7 @@
         case "\n":
         case "\r":
         case "\t":
+        case "=":
           $start = $this->position - 2;
           while ($this->position < $this->length && $this->rawtext{$this->position} != '<')
               $this->position++;

Modified: 3.x/trunk/limb/wact/tests/cases/compiler/parser/WactHTMLParserTest.class.php
===================================================================
--- 3.x/trunk/limb/wact/tests/cases/compiler/parser/WactHTMLParserTest.class.php	2007-05-13 11:22:40 UTC (rev 5879)
+++ 3.x/trunk/limb/wact/tests/cases/compiler/parser/WactHTMLParserTest.class.php	2007-05-13 12:04:03 UTC (rev 5880)
@@ -531,6 +531,17 @@
     $this->checkEndTagEvent(3, 'script', $location);
   }
 
+  function testJSComparisonSymbolIsNotATag2()
+  {
+    $location = $this->_createLocation();
+    $this->parser->parse('<script> for(var i=0; i <= 10; i++){ document.write(">");} </script>', $this->file_name);
+    $this->checkEventsCount(4);
+    $this->checkStartTagEvent(0, 'script', array(), $location);
+    $this->checkCharactersEvent(1, ' for(var i=0; i ', $location);
+    $this->checkCharactersEvent(2, '<= 10; i++){ document.write(">");} ', $location);
+    $this->checkEndTagEvent(3, 'script', $location);
+  }
+
   function testEmptyJasp()
   {
     $location = $this->_createLocation();



More information about the limb-svn mailing list