instiki/vendor/plugins/HTML5lib/testdata/tokenizer/contentModelFlags.test

49 lines
1.5 KiB
Plaintext
Raw Normal View History

2007-06-12 06:33:06 +02:00
{"tests": [
{"description":"PLAINTEXT content model flag",
"contentModelFlags":["PLAINTEXT"],
"input":"<head>&body;",
"output":[["Character", "<head>&body;"]]},
{"description":"End tag closing RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"bar",
"input":"foo</bar>",
"output":[["Character", "foo"], ["EndTag", "bar"]]},
{"description":"End tag closing RCDATA or CDATA (case-insensitivity)",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"bar",
"input":"foo</bAr>",
"output":[["Character", "foo"], ["EndTag", "bar"]]},
2007-06-12 06:33:06 +02:00
{"description":"End tag with incorrect name in RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"baz",
"input":"</foo>bar</baz>",
2007-06-22 10:12:08 +02:00
"output":[["Character", "</foo>bar"], ["EndTag", "baz"]]},
2007-06-12 06:33:06 +02:00
{"description":"End tag with incorrect name in RCDATA or CDATA (starting like correct name)",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"baz",
"input":"</foo>bar</bazaar>",
"output":[["Character", "</foo>bar</bazaar>"]]},
2007-06-12 06:33:06 +02:00
{"description":"End tag closing RCDATA or CDATA, switching back to PCDATA",
"contentModelFlags":["RCDATA", "CDATA"],
"lastStartTag":"bar",
"input":"foo</bar></baz>",
"output":[["Character", "foo"], ["EndTag", "bar"], ["EndTag", "baz"]]},
{"description":"CDATA w/ something looking like an entity",
"contentModelFlags":["CDATA"],
"input":"&foo;",
"output":[["Character", "&foo;"]]},
{"description":"RCDATA w/ an entity",
"contentModelFlags":["RCDATA"],
"input":"&lt;",
"output":[["Character", "<"]]}
]}