]> git.proxmox.com Git - rustc.git/blob - src/vendor/html5ever/html5lib-tests/tokenizer/contentModelFlags.test
New upstream version 1.27.1+dfsg1
[rustc.git] / src / vendor / html5ever / html5lib-tests / tokenizer / contentModelFlags.test
1 {"tests": [
2
3 {"description":"PLAINTEXT content model flag",
4 "initialStates":["PLAINTEXT state"],
5 "lastStartTag":"plaintext",
6 "input":"<head>&body;",
7 "output":[["Character", "<head>&body;"]]},
8
9 {"description":"End tag closing RCDATA or RAWTEXT",
10 "initialStates":["RCDATA state", "RAWTEXT state"],
11 "lastStartTag":"xmp",
12 "input":"foo</xmp>",
13 "output":[["Character", "foo"], ["EndTag", "xmp"]]},
14
15 {"description":"End tag closing RCDATA or RAWTEXT (case-insensitivity)",
16 "initialStates":["RCDATA state", "RAWTEXT state"],
17 "lastStartTag":"xmp",
18 "input":"foo</xMp>",
19 "output":[["Character", "foo"], ["EndTag", "xmp"]]},
20
21 {"description":"End tag closing RCDATA or RAWTEXT (ending with space)",
22 "initialStates":["RCDATA state", "RAWTEXT state"],
23 "lastStartTag":"xmp",
24 "input":"foo</xmp ",
25 "output":[["Character", "foo"], "ParseError"]},
26
27 {"description":"End tag closing RCDATA or RAWTEXT (ending with EOF)",
28 "initialStates":["RCDATA state", "RAWTEXT state"],
29 "lastStartTag":"xmp",
30 "input":"foo</xmp",
31 "output":[["Character", "foo</xmp"]]},
32
33 {"description":"End tag closing RCDATA or RAWTEXT (ending with slash)",
34 "initialStates":["RCDATA state", "RAWTEXT state"],
35 "lastStartTag":"xmp",
36 "input":"foo</xmp/",
37 "output":[["Character", "foo"], "ParseError"]},
38
39 {"description":"End tag not closing RCDATA or RAWTEXT (ending with left-angle-bracket)",
40 "initialStates":["RCDATA state", "RAWTEXT state"],
41 "lastStartTag":"xmp",
42 "input":"foo</xmp<",
43 "output":[["Character", "foo</xmp<"]]},
44
45 {"description":"End tag with incorrect name in RCDATA or RAWTEXT",
46 "initialStates":["RCDATA state", "RAWTEXT state"],
47 "lastStartTag":"xmp",
48 "input":"</foo>bar</xmp>",
49 "output":[["Character", "</foo>bar"], ["EndTag", "xmp"]]},
50
51 {"description":"Partial end tags leading straight into partial end tags",
52 "initialStates":["RCDATA state", "RAWTEXT state"],
53 "lastStartTag":"xmp",
54 "input":"</xmp</xmp</xmp>",
55 "output":[["Character", "</xmp</xmp"], ["EndTag", "xmp"]]},
56
57 {"description":"End tag with incorrect name in RCDATA or RAWTEXT (starting like correct name)",
58 "initialStates":["RCDATA state", "RAWTEXT state"],
59 "lastStartTag":"xmp",
60 "input":"</foo>bar</xmpaar>",
61 "output":[["Character", "</foo>bar</xmpaar>"]]},
62
63 {"description":"End tag closing RCDATA or RAWTEXT, switching back to PCDATA",
64 "initialStates":["RCDATA state", "RAWTEXT state"],
65 "lastStartTag":"xmp",
66 "input":"foo</xmp></baz>",
67 "output":[["Character", "foo"], ["EndTag", "xmp"], ["EndTag", "baz"]]},
68
69 {"description":"RAWTEXT w/ something looking like an entity",
70 "initialStates":["RAWTEXT state"],
71 "lastStartTag":"xmp",
72 "input":"&foo;",
73 "output":[["Character", "&foo;"]]},
74
75 {"description":"RCDATA w/ an entity",
76 "initialStates":["RCDATA state"],
77 "lastStartTag":"textarea",
78 "input":"&lt;",
79 "output":[["Character", "<"]]}
80
81 ]}