summaryrefslogtreecommitdiff
path: root/test/data/tokeniser2/escapeFlag.test
blob: 8736c3caeb7e31c191e794fabb499007338929ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{"tests": [

{"description":"Commented close tag in [R]CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"pre",
"input":"foo<!--</pre>--></pre>",
"output":[["Character", "foo<!--</pre>-->"], ["EndTag", "pre"]]},

{"description":"Bogus comment in [R]CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"pre",
"input":"foo<!-->baz</pre>",
"output":[["Character", "foo<!-->baz"], ["EndTag", "pre"]]},

{"description":"End tag surrounded by bogus comment in [R]CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"pre",
"input":"foo<!--></pre><!-->baz</pre>",
"output":[["Character", "foo<!-->"], ["EndTag", "pre"], "ParseError", ["Comment", ""], ["Character", "baz"], ["EndTag", "pre"]]},

{"description":"Commented entities in RCDATA",
"contentModelFlags":["RCDATA"],
"lastStartTag":"pre",
"input":" &amp; <!-- &amp; --> &amp; </pre>",
"output":[["Character", " & <!-- &amp; --> & "], ["EndTag", "pre"]]},

{"description":"Incorrect comment ending sequences in [R]CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"pre",
"input":"foo<!-- x --x>x-- >x--!>x--<></pre>",
"output":[["Character", "foo<!-- x --x>x-- >x--!>x--<></pre>"]]}

]}