901 lines
24 KiB
Plaintext
901 lines
24 KiB
Plaintext
{"tests": [
|
|
|
|
{"description": "html start-tag followed by text, with attributes",
|
|
"input": [["StartTag", "html", {"lang": "en"}], ["Characters", "foo"]],
|
|
"expected": ["<html lang=en>foo"]
|
|
},
|
|
|
|
|
|
|
|
{"description": "html start-tag followed by comment",
|
|
"input": [["StartTag", "html", {}], ["Comment", "foo"]],
|
|
"expected": ["<html><!--foo-->"]
|
|
},
|
|
|
|
{"description": "html start-tag followed by space character",
|
|
"input": [["StartTag", "html", {}], ["Characters", " foo"]],
|
|
"expected": ["<html> foo"]
|
|
},
|
|
|
|
{"description": "html start-tag followed by text",
|
|
"input": [["StartTag", "html", {}], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "html start-tag followed by start-tag",
|
|
"input": [["StartTag", "html", {}], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "html start-tag followed by end-tag",
|
|
"input": [["StartTag", "html", {}], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "html start-tag at EOF (shouldn't ever happen?!)",
|
|
"input": [["StartTag", "html", {}]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
{"description": "html end-tag followed by comment",
|
|
"input": [["EndTag", "html"], ["Comment", "foo"]],
|
|
"expected": ["</html><!--foo-->"]
|
|
},
|
|
|
|
{"description": "html end-tag followed by space character",
|
|
"input": [["EndTag", "html"], ["Characters", " foo"]],
|
|
"expected": ["</html> foo"]
|
|
},
|
|
|
|
{"description": "html end-tag followed by text",
|
|
"input": [["EndTag", "html"], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "html end-tag followed by start-tag",
|
|
"input": [["EndTag", "html"], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "html end-tag followed by end-tag",
|
|
"input": [["EndTag", "html"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "html end-tag at EOF",
|
|
"input": [["EndTag", "html"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "head start-tag followed by comment",
|
|
"input": [["StartTag", "head", {}], ["Comment", "foo"]],
|
|
"expected": ["<head><!--foo-->"]
|
|
},
|
|
|
|
{"description": "head start-tag followed by space character",
|
|
"input": [["StartTag", "head", {}], ["Characters", " foo"]],
|
|
"expected": ["<head> foo"]
|
|
},
|
|
|
|
{"description": "head start-tag followed by text",
|
|
"input": [["StartTag", "head", {}], ["Characters", "foo"]],
|
|
"expected": ["<head>foo"]
|
|
},
|
|
|
|
{"description": "head start-tag followed by start-tag",
|
|
"input": [["StartTag", "head", {}], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "head start-tag followed by end-tag",
|
|
"input": [["StartTag", "head", {}], ["EndTag", "foo", {}]],
|
|
"expected": ["<head></foo>"]
|
|
},
|
|
|
|
{"description": "head start-tag at EOF (shouldn't ever happen?!)",
|
|
"input": [["StartTag", "head", {}]],
|
|
"expected": ["<head>"]
|
|
},
|
|
|
|
|
|
|
|
{"description": "head end-tag followed by comment",
|
|
"input": [["EndTag", "head"], ["Comment", "foo"]],
|
|
"expected": ["</head><!--foo-->"]
|
|
},
|
|
|
|
{"description": "head end-tag followed by space character",
|
|
"input": [["EndTag", "head"], ["Characters", " foo"]],
|
|
"expected": ["</head> foo"]
|
|
},
|
|
|
|
{"description": "head end-tag followed by text",
|
|
"input": [["EndTag", "head"], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "head end-tag followed by start-tag",
|
|
"input": [["EndTag", "head"], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "head end-tag followed by end-tag",
|
|
"input": [["EndTag", "head"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "head end-tag at EOF",
|
|
"input": [["EndTag", "head"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "body start-tag followed by comment",
|
|
"input": [["StartTag", "body", {}], ["Comment", "foo"]],
|
|
"expected": ["<body><!--foo-->"]
|
|
},
|
|
|
|
{"description": "body start-tag followed by space character",
|
|
"input": [["StartTag", "body", {}], ["Characters", " foo"]],
|
|
"expected": ["<body> foo"]
|
|
},
|
|
|
|
{"description": "body start-tag followed by text",
|
|
"input": [["StartTag", "body", {}], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "body start-tag followed by start-tag",
|
|
"input": [["StartTag", "body", {}], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "body start-tag followed by end-tag",
|
|
"input": [["StartTag", "body", {}], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "body start-tag at EOF (shouldn't ever happen?!)",
|
|
"input": [["StartTag", "body", {}]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
{"description": "body end-tag followed by comment",
|
|
"input": [["EndTag", "body"], ["Comment", "foo"]],
|
|
"expected": ["</body><!--foo-->"]
|
|
},
|
|
|
|
{"description": "body end-tag followed by space character",
|
|
"input": [["EndTag", "body"], ["Characters", " foo"]],
|
|
"expected": ["</body> foo"]
|
|
},
|
|
|
|
{"description": "body end-tag followed by text",
|
|
"input": [["EndTag", "body"], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "body end-tag followed by start-tag",
|
|
"input": [["EndTag", "body"], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "body end-tag followed by end-tag",
|
|
"input": [["EndTag", "body"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "body end-tag at EOF",
|
|
"input": [["EndTag", "body"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "li end-tag followed by comment",
|
|
"input": [["EndTag", "li"], ["Comment", "foo"]],
|
|
"expected": ["</li><!--foo-->"]
|
|
},
|
|
|
|
{"description": "li end-tag followed by space character",
|
|
"input": [["EndTag", "li"], ["Characters", " foo"]],
|
|
"expected": ["</li> foo"]
|
|
},
|
|
|
|
{"description": "li end-tag followed by text",
|
|
"input": [["EndTag", "li"], ["Characters", "foo"]],
|
|
"expected": ["</li>foo"]
|
|
},
|
|
|
|
{"description": "li end-tag followed by start-tag",
|
|
"input": [["EndTag", "li"], ["StartTag", "foo", {}]],
|
|
"expected": ["</li><foo>"]
|
|
},
|
|
|
|
{"description": "li end-tag followed by li start-tag",
|
|
"input": [["EndTag", "li"], ["StartTag", "li", {}]],
|
|
"expected": ["<li>"]
|
|
},
|
|
|
|
{"description": "li end-tag followed by end-tag",
|
|
"input": [["EndTag", "li"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "li end-tag at EOF",
|
|
"input": [["EndTag", "li"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "dt end-tag followed by comment",
|
|
"input": [["EndTag", "dt"], ["Comment", "foo"]],
|
|
"expected": ["</dt><!--foo-->"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by space character",
|
|
"input": [["EndTag", "dt"], ["Characters", " foo"]],
|
|
"expected": ["</dt> foo"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by text",
|
|
"input": [["EndTag", "dt"], ["Characters", "foo"]],
|
|
"expected": ["</dt>foo"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by start-tag",
|
|
"input": [["EndTag", "dt"], ["StartTag", "foo", {}]],
|
|
"expected": ["</dt><foo>"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by dt start-tag",
|
|
"input": [["EndTag", "dt"], ["StartTag", "dt", {}]],
|
|
"expected": ["<dt>"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by dd start-tag",
|
|
"input": [["EndTag", "dt"], ["StartTag", "dd", {}]],
|
|
"expected": ["<dd>"]
|
|
},
|
|
|
|
{"description": "dt end-tag followed by end-tag",
|
|
"input": [["EndTag", "dt"], ["EndTag", "foo", {}]],
|
|
"expected": ["</dt></foo>"]
|
|
},
|
|
|
|
{"description": "dt end-tag at EOF",
|
|
"input": [["EndTag", "dt"]],
|
|
"expected": ["</dt>"]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "dd end-tag followed by comment",
|
|
"input": [["EndTag", "dd"], ["Comment", "foo"]],
|
|
"expected": ["</dd><!--foo-->"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by space character",
|
|
"input": [["EndTag", "dd"], ["Characters", " foo"]],
|
|
"expected": ["</dd> foo"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by text",
|
|
"input": [["EndTag", "dd"], ["Characters", "foo"]],
|
|
"expected": ["</dd>foo"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by start-tag",
|
|
"input": [["EndTag", "dd"], ["StartTag", "foo", {}]],
|
|
"expected": ["</dd><foo>"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by dd start-tag",
|
|
"input": [["EndTag", "dd"], ["StartTag", "dd", {}]],
|
|
"expected": ["<dd>"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by dt start-tag",
|
|
"input": [["EndTag", "dd"], ["StartTag", "dt", {}]],
|
|
"expected": ["<dt>"]
|
|
},
|
|
|
|
{"description": "dd end-tag followed by end-tag",
|
|
"input": [["EndTag", "dd"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "dd end-tag at EOF",
|
|
"input": [["EndTag", "dd"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "p end-tag followed by comment",
|
|
"input": [["EndTag", "p"], ["Comment", "foo"]],
|
|
"expected": ["</p><!--foo-->"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by space character",
|
|
"input": [["EndTag", "p"], ["Characters", " foo"]],
|
|
"expected": ["</p> foo"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by text",
|
|
"input": [["EndTag", "p"], ["Characters", "foo"]],
|
|
"expected": ["</p>foo"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "foo", {}]],
|
|
"expected": ["</p><foo>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by address start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "address", {}]],
|
|
"expected": ["<address>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by blockquote start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "blockquote", {}]],
|
|
"expected": ["<blockquote>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by dl start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "dl", {}]],
|
|
"expected": ["<dl>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by fieldset start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "fieldset", {}]],
|
|
"expected": ["<fieldset>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by form start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "form", {}]],
|
|
"expected": ["<form>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h1 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h1", {}]],
|
|
"expected": ["<h1>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h2 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h2", {}]],
|
|
"expected": ["<h2>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h3 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h3", {}]],
|
|
"expected": ["<h3>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h4 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h4", {}]],
|
|
"expected": ["<h4>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h5 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h5", {}]],
|
|
"expected": ["<h5>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by h6 start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "h6", {}]],
|
|
"expected": ["<h6>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by hr start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "hr", {}]],
|
|
"expected": ["<hr>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by menu start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "menu", {}]],
|
|
"expected": ["<menu>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by ol start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "ol", {}]],
|
|
"expected": ["<ol>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by p start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "p", {}]],
|
|
"expected": ["<p>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by pre start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "pre", {}]],
|
|
"expected": ["<pre>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by table start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "table", {}]],
|
|
"expected": ["<table>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by ul start-tag",
|
|
"input": [["EndTag", "p"], ["StartTag", "ul", {}]],
|
|
"expected": ["<ul>"]
|
|
},
|
|
|
|
{"description": "p end-tag followed by end-tag",
|
|
"input": [["EndTag", "p"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "p end-tag at EOF",
|
|
"input": [["EndTag", "p"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "optgroup end-tag followed by comment",
|
|
"input": [["EndTag", "optgroup"], ["Comment", "foo"]],
|
|
"expected": ["</optgroup><!--foo-->"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag followed by space character",
|
|
"input": [["EndTag", "optgroup"], ["Characters", " foo"]],
|
|
"expected": ["</optgroup> foo"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag followed by text",
|
|
"input": [["EndTag", "optgroup"], ["Characters", "foo"]],
|
|
"expected": ["</optgroup>foo"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag followed by start-tag",
|
|
"input": [["EndTag", "optgroup"], ["StartTag", "foo", {}]],
|
|
"expected": ["</optgroup><foo>"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag followed by optgroup start-tag",
|
|
"input": [["EndTag", "optgroup"], ["StartTag", "optgroup", {}]],
|
|
"expected": ["<optgroup>"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag followed by end-tag",
|
|
"input": [["EndTag", "optgroup"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "optgroup end-tag at EOF",
|
|
"input": [["EndTag", "optgroup"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "option end-tag followed by comment",
|
|
"input": [["EndTag", "option"], ["Comment", "foo"]],
|
|
"expected": ["</option><!--foo-->"]
|
|
},
|
|
|
|
{"description": "option end-tag followed by space character",
|
|
"input": [["EndTag", "option"], ["Characters", " foo"]],
|
|
"expected": ["</option> foo"]
|
|
},
|
|
|
|
{"description": "option end-tag followed by text",
|
|
"input": [["EndTag", "option"], ["Characters", "foo"]],
|
|
"expected": ["</option>foo"]
|
|
},
|
|
|
|
{"description": "option end-tag followed by start-tag",
|
|
"input": [["EndTag", "option"], ["StartTag", "foo", {}]],
|
|
"expected": ["</option><foo>"]
|
|
},
|
|
|
|
{"description": "option end-tag followed by option start-tag",
|
|
"input": [["EndTag", "option"], ["StartTag", "option", {}]],
|
|
"expected": ["<option>"]
|
|
},
|
|
|
|
{"description": "option end-tag followed by end-tag",
|
|
"input": [["EndTag", "option"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "option end-tag at EOF",
|
|
"input": [["EndTag", "option"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "colgroup start-tag followed by comment",
|
|
"input": [["StartTag", "colgroup", {}], ["Comment", "foo"]],
|
|
"expected": ["<colgroup><!--foo-->"]
|
|
},
|
|
|
|
{"description": "colgroup start-tag followed by space character",
|
|
"input": [["StartTag", "colgroup", {}], ["Characters", " foo"]],
|
|
"expected": ["<colgroup> foo"]
|
|
},
|
|
|
|
{"description": "colgroup start-tag followed by text",
|
|
"input": [["StartTag", "colgroup", {}], ["Characters", "foo"]],
|
|
"expected": ["<colgroup>foo"]
|
|
},
|
|
|
|
{"description": "colgroup start-tag followed by start-tag",
|
|
"input": [["StartTag", "colgroup", {}], ["StartTag", "foo", {}]],
|
|
"expected": ["<colgroup><foo>"]
|
|
},
|
|
|
|
{"description": "first colgroup in a table with a col child",
|
|
"input": [["StartTag", "table", {}], ["StartTag", "colgroup", {}], ["StartTag", "col", {}]],
|
|
"expected": ["<table><col>"]
|
|
},
|
|
|
|
{"description": "colgroup with a col child, following another colgroup",
|
|
"input": [["EndTag", "colgroup", {}], ["StartTag", "colgroup", {}], ["StartTag", "col", {}]],
|
|
"expected": ["</colgroup><col>", "<colgroup><col>"]
|
|
},
|
|
|
|
{"description": "colgroup start-tag followed by end-tag",
|
|
"input": [["StartTag", "colgroup", {}], ["EndTag", "foo", {}]],
|
|
"expected": ["<colgroup></foo>"]
|
|
},
|
|
|
|
{"description": "colgroup start-tag at EOF",
|
|
"input": [["StartTag", "colgroup", {}]],
|
|
"expected": ["<colgroup>"]
|
|
},
|
|
|
|
|
|
|
|
{"description": "colgroup end-tag followed by comment",
|
|
"input": [["EndTag", "colgroup"], ["Comment", "foo"]],
|
|
"expected": ["</colgroup><!--foo-->"]
|
|
},
|
|
|
|
{"description": "colgroup end-tag followed by space character",
|
|
"input": [["EndTag", "colgroup"], ["Characters", " foo"]],
|
|
"expected": ["</colgroup> foo"]
|
|
},
|
|
|
|
{"description": "colgroup end-tag followed by text",
|
|
"input": [["EndTag", "colgroup"], ["Characters", "foo"]],
|
|
"expected": ["foo"]
|
|
},
|
|
|
|
{"description": "colgroup end-tag followed by start-tag",
|
|
"input": [["EndTag", "colgroup"], ["StartTag", "foo", {}]],
|
|
"expected": ["<foo>"]
|
|
},
|
|
|
|
{"description": "colgroup end-tag followed by end-tag",
|
|
"input": [["EndTag", "colgroup"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "colgroup end-tag at EOF",
|
|
"input": [["EndTag", "colgroup"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "thead end-tag followed by comment",
|
|
"input": [["EndTag", "thead"], ["Comment", "foo"]],
|
|
"expected": ["</thead><!--foo-->"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by space character",
|
|
"input": [["EndTag", "thead"], ["Characters", " foo"]],
|
|
"expected": ["</thead> foo"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by text",
|
|
"input": [["EndTag", "thead"], ["Characters", "foo"]],
|
|
"expected": ["</thead>foo"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by start-tag",
|
|
"input": [["EndTag", "thead"], ["StartTag", "foo", {}]],
|
|
"expected": ["</thead><foo>"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by tbody start-tag",
|
|
"input": [["EndTag", "thead"], ["StartTag", "tbody", {}]],
|
|
"expected": ["<tbody>"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by tfoot start-tag",
|
|
"input": [["EndTag", "thead"], ["StartTag", "tfoot", {}]],
|
|
"expected": ["<tfoot>"]
|
|
},
|
|
|
|
{"description": "thead end-tag followed by end-tag",
|
|
"input": [["EndTag", "thead"], ["EndTag", "foo", {}]],
|
|
"expected": ["</thead></foo>"]
|
|
},
|
|
|
|
{"description": "thead end-tag at EOF",
|
|
"input": [["EndTag", "thead"]],
|
|
"expected": ["</thead>"]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "tbody start-tag followed by comment",
|
|
"input": [["StartTag", "tbody", {}], ["Comment", "foo"]],
|
|
"expected": ["<tbody><!--foo-->"]
|
|
},
|
|
|
|
{"description": "tbody start-tag followed by space character",
|
|
"input": [["StartTag", "tbody", {}], ["Characters", " foo"]],
|
|
"expected": ["<tbody> foo"]
|
|
},
|
|
|
|
{"description": "tbody start-tag followed by text",
|
|
"input": [["StartTag", "tbody", {}], ["Characters", "foo"]],
|
|
"expected": ["<tbody>foo"]
|
|
},
|
|
|
|
{"description": "tbody start-tag followed by start-tag",
|
|
"input": [["StartTag", "tbody", {}], ["StartTag", "foo", {}]],
|
|
"expected": ["<tbody><foo>"]
|
|
},
|
|
|
|
{"description": "first tbody in a table with a tr child",
|
|
"input": [["StartTag", "table", {}], ["StartTag", "tbody", {}], ["StartTag", "tr", {}]],
|
|
"expected": ["<table><tr>"]
|
|
},
|
|
|
|
{"description": "tbody with a tr child, following another tbody",
|
|
"input": [["EndTag", "tbody", {}], ["StartTag", "tbody", {}], ["StartTag", "tr", {}]],
|
|
"expected": ["<tbody><tr>", "</tbody><tr>"]
|
|
},
|
|
|
|
{"description": "tbody with a tr child, following a thead",
|
|
"input": [["EndTag", "thead", {}], ["StartTag", "tbody", {}], ["StartTag", "tr", {}]],
|
|
"expected": ["<tbody><tr>", "</thead><tr>"]
|
|
},
|
|
|
|
{"description": "tbody with a tr child, following a tfoot",
|
|
"input": [["EndTag", "tfoot", {}], ["StartTag", "tbody", {}], ["StartTag", "tr", {}]],
|
|
"expected": ["<tbody><tr>", "</tfoot><tr>"]
|
|
},
|
|
|
|
{"description": "tbody start-tag followed by end-tag",
|
|
"input": [["StartTag", "tbody", {}], ["EndTag", "foo", {}]],
|
|
"expected": ["<tbody></foo>"]
|
|
},
|
|
|
|
{"description": "tbody start-tag at EOF",
|
|
"input": [["StartTag", "tbody", {}]],
|
|
"expected": ["<tbody>"]
|
|
},
|
|
|
|
|
|
|
|
{"description": "tbody end-tag followed by comment",
|
|
"input": [["EndTag", "tbody"], ["Comment", "foo"]],
|
|
"expected": ["</tbody><!--foo-->"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by space character",
|
|
"input": [["EndTag", "tbody"], ["Characters", " foo"]],
|
|
"expected": ["</tbody> foo"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by text",
|
|
"input": [["EndTag", "tbody"], ["Characters", "foo"]],
|
|
"expected": ["</tbody>foo"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by start-tag",
|
|
"input": [["EndTag", "tbody"], ["StartTag", "foo", {}]],
|
|
"expected": ["</tbody><foo>"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by tbody start-tag",
|
|
"input": [["EndTag", "tbody"], ["StartTag", "tbody", {}]],
|
|
"expected": ["<tbody>", "</tbody>"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by tfoot start-tag",
|
|
"input": [["EndTag", "tbody"], ["StartTag", "tfoot", {}]],
|
|
"expected": ["<tfoot>"]
|
|
},
|
|
|
|
{"description": "tbody end-tag followed by end-tag",
|
|
"input": [["EndTag", "tbody"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "tbody end-tag at EOF",
|
|
"input": [["EndTag", "tbody"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "tfoot end-tag followed by comment",
|
|
"input": [["EndTag", "tfoot"], ["Comment", "foo"]],
|
|
"expected": ["</tfoot><!--foo-->"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag followed by space character",
|
|
"input": [["EndTag", "tfoot"], ["Characters", " foo"]],
|
|
"expected": ["</tfoot> foo"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag followed by text",
|
|
"input": [["EndTag", "tfoot"], ["Characters", "foo"]],
|
|
"expected": ["</tfoot>foo"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag followed by start-tag",
|
|
"input": [["EndTag", "tfoot"], ["StartTag", "foo", {}]],
|
|
"expected": ["</tfoot><foo>"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag followed by tbody start-tag",
|
|
"input": [["EndTag", "tfoot"], ["StartTag", "tbody", {}]],
|
|
"expected": ["<tbody>", "</tfoot>"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag followed by end-tag",
|
|
"input": [["EndTag", "tfoot"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "tfoot end-tag at EOF",
|
|
"input": [["EndTag", "tfoot"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "tr end-tag followed by comment",
|
|
"input": [["EndTag", "tr"], ["Comment", "foo"]],
|
|
"expected": ["</tr><!--foo-->"]
|
|
},
|
|
|
|
{"description": "tr end-tag followed by space character",
|
|
"input": [["EndTag", "tr"], ["Characters", " foo"]],
|
|
"expected": ["</tr> foo"]
|
|
},
|
|
|
|
{"description": "tr end-tag followed by text",
|
|
"input": [["EndTag", "tr"], ["Characters", "foo"]],
|
|
"expected": ["</tr>foo"]
|
|
},
|
|
|
|
{"description": "tr end-tag followed by start-tag",
|
|
"input": [["EndTag", "tr"], ["StartTag", "foo", {}]],
|
|
"expected": ["</tr><foo>"]
|
|
},
|
|
|
|
{"description": "tr end-tag followed by tr start-tag",
|
|
"input": [["EndTag", "tr"], ["StartTag", "tr", {}]],
|
|
"expected": ["<tr>", "</tr>"]
|
|
},
|
|
|
|
{"description": "tr end-tag followed by end-tag",
|
|
"input": [["EndTag", "tr"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "tr end-tag at EOF",
|
|
"input": [["EndTag", "tr"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "td end-tag followed by comment",
|
|
"input": [["EndTag", "td"], ["Comment", "foo"]],
|
|
"expected": ["</td><!--foo-->"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by space character",
|
|
"input": [["EndTag", "td"], ["Characters", " foo"]],
|
|
"expected": ["</td> foo"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by text",
|
|
"input": [["EndTag", "td"], ["Characters", "foo"]],
|
|
"expected": ["</td>foo"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by start-tag",
|
|
"input": [["EndTag", "td"], ["StartTag", "foo", {}]],
|
|
"expected": ["</td><foo>"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by td start-tag",
|
|
"input": [["EndTag", "td"], ["StartTag", "td", {}]],
|
|
"expected": ["<td>", "</td>"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by th start-tag",
|
|
"input": [["EndTag", "td"], ["StartTag", "th", {}]],
|
|
"expected": ["<th>", "</td>"]
|
|
},
|
|
|
|
{"description": "td end-tag followed by end-tag",
|
|
"input": [["EndTag", "td"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "td end-tag at EOF",
|
|
"input": [["EndTag", "td"]],
|
|
"expected": [""]
|
|
},
|
|
|
|
|
|
|
|
|
|
{"description": "th end-tag followed by comment",
|
|
"input": [["EndTag", "th"], ["Comment", "foo"]],
|
|
"expected": ["</th><!--foo-->"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by space character",
|
|
"input": [["EndTag", "th"], ["Characters", " foo"]],
|
|
"expected": ["</th> foo"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by text",
|
|
"input": [["EndTag", "th"], ["Characters", "foo"]],
|
|
"expected": ["</th>foo"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by start-tag",
|
|
"input": [["EndTag", "th"], ["StartTag", "foo", {}]],
|
|
"expected": ["</th><foo>"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by th start-tag",
|
|
"input": [["EndTag", "th"], ["StartTag", "th", {}]],
|
|
"expected": ["<th>", "</th>"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by td start-tag",
|
|
"input": [["EndTag", "th"], ["StartTag", "td", {}]],
|
|
"expected": ["<td>", "</th>"]
|
|
},
|
|
|
|
{"description": "th end-tag followed by end-tag",
|
|
"input": [["EndTag", "th"], ["EndTag", "foo", {}]],
|
|
"expected": ["</foo>"]
|
|
},
|
|
|
|
{"description": "th end-tag at EOF",
|
|
"input": [["EndTag", "th"]],
|
|
"expected": [""]
|
|
}
|
|
|
|
]}
|