diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/HTML5/Parser/TokenizerTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index cae2adb..8e41552 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -122,6 +122,7 @@ class TokenizerTest extends \HTML5\Tests\TestCase { '</a <b>' => 'a', '</a <b <c>' => 'a', '</a is the loneliest letter>' => 'a', + '</a' => 'a', ); foreach ($fail as $test => $result) { $events = $this->parse($test); @@ -153,4 +154,22 @@ class TokenizerTest extends \HTML5\Tests\TestCase { $this->assertEquals(3, $events->depth()); } } + + public function testComment() { + $good = array( + '<!-- 1 > 0 -->' => ' 1 > 0 ', + '<!-- --$i -->' => ' --$i ', + '<!----$i-->' => '--$i', + '<!-- 1 > 0 -->' => ' 1 > 0 ', + '<!-- + Hello World. + -->' => "\nHello World\n", + '<!-- <!-- -->' => ' <!-- ', + ); + $fail = array( + '<!-->' => '', + '<!--Hello' => 'Hello', + ); + $this->assertFalse(TRUE); + } } |