summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTechnosophos <[email protected]>2013-04-11 21:45:47 -0500
committerTechnosophos <[email protected]>2013-04-11 21:45:47 -0500
commit40c5ae944365c947fd4a5c2755505ffc745070cd (patch)
tree029e9fa5cdd470acb7316d83fb4030864d7bac18 /test
parent892335b82e3587fbb96ef4ef62bb1edd16ad636f (diff)
Working on comments.
Diffstat (limited to 'test')
-rw-r--r--test/HTML5/Parser/TokenizerTest.php19
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);
+ }
}