From 9909fc4580855a58a10eb84f0d143d1b3b3f464a Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 24 Nov 2021 20:44:08 +0100 Subject: hello world --- tests/html5lib-tests/tree-construction/README.md | 108 + .../tree-construction/adoption01.dat | 354 +++ .../tree-construction/adoption02.dat | 39 + tests/html5lib-tests/tree-construction/blocks.dat | 695 ++++++ .../tree-construction/comments01.dat | 217 ++ .../html5lib-tests/tree-construction/doctype01.dat | 474 ++++ .../tree-construction/domjs-unsafe.dat | Bin 0 -> 10356 bytes .../tree-construction/entities01.dat | 943 +++++++ .../tree-construction/entities02.dat | 309 +++ .../tree-construction/foreign-fragment.dat | 653 +++++ .../tree-construction/html5test-com.dat | 301 +++ .../html5lib-tests/tree-construction/inbody01.dat | 54 + tests/html5lib-tests/tree-construction/isindex.dat | 49 + .../tree-construction/main-element.dat | 46 + tests/html5lib-tests/tree-construction/math.dat | 104 + .../tree-construction/menuitem-element.dat | 240 ++ .../tree-construction/namespace-sensitivity.dat | 22 + .../tree-construction/noscript01.dat | 237 ++ .../pending-spec-changes-plain-text-unsafe.dat | Bin 0 -> 927 bytes .../tree-construction/pending-spec-changes.dat | 46 + .../tree-construction/plain-text-unsafe.dat | Bin 0 -> 9486 bytes tests/html5lib-tests/tree-construction/ruby.dat | 302 +++ .../tree-construction/scriptdata01.dat | 385 +++ .../tree-construction/scripted/adoption01.dat | 16 + .../tree-construction/scripted/ark.dat | 27 + .../tree-construction/scripted/webkit01.dat | 30 + tests/html5lib-tests/tree-construction/svg.dat | 104 + .../html5lib-tests/tree-construction/tables01.dat | 286 +++ .../html5lib-tests/tree-construction/template.dat | 1613 ++++++++++++ tests/html5lib-tests/tree-construction/tests1.dat | 1987 +++++++++++++++ tests/html5lib-tests/tree-construction/tests10.dat | 849 +++++++ tests/html5lib-tests/tree-construction/tests11.dat | 523 ++++ tests/html5lib-tests/tree-construction/tests12.dat | 62 + tests/html5lib-tests/tree-construction/tests14.dat | 75 + tests/html5lib-tests/tree-construction/tests15.dat | 216 ++ tests/html5lib-tests/tree-construction/tests16.dat | 2602 ++++++++++++++++++++ tests/html5lib-tests/tree-construction/tests17.dat | 179 ++ tests/html5lib-tests/tree-construction/tests18.dat | 558 +++++ tests/html5lib-tests/tree-construction/tests19.dat | 1453 +++++++++++ tests/html5lib-tests/tree-construction/tests2.dat | 821 ++++++ tests/html5lib-tests/tree-construction/tests20.dat | 583 +++++ tests/html5lib-tests/tree-construction/tests21.dat | 333 +++ tests/html5lib-tests/tree-construction/tests22.dat | 190 ++ tests/html5lib-tests/tree-construction/tests23.dat | 168 ++ tests/html5lib-tests/tree-construction/tests24.dat | 79 + tests/html5lib-tests/tree-construction/tests25.dat | 288 +++ tests/html5lib-tests/tree-construction/tests26.dat | 453 ++++ tests/html5lib-tests/tree-construction/tests3.dat | 305 +++ tests/html5lib-tests/tree-construction/tests4.dat | 58 + tests/html5lib-tests/tree-construction/tests5.dat | 210 ++ tests/html5lib-tests/tree-construction/tests6.dat | 663 +++++ tests/html5lib-tests/tree-construction/tests7.dat | 417 ++++ tests/html5lib-tests/tree-construction/tests8.dat | 165 ++ tests/html5lib-tests/tree-construction/tests9.dat | 472 ++++ .../tree-construction/tests_innerHTML_1.dat | 887 +++++++ .../html5lib-tests/tree-construction/tricky01.dat | 336 +++ .../html5lib-tests/tree-construction/webkit01.dat | 759 ++++++ .../html5lib-tests/tree-construction/webkit02.dat | 336 +++ 58 files changed, 23681 insertions(+) create mode 100644 tests/html5lib-tests/tree-construction/README.md create mode 100644 tests/html5lib-tests/tree-construction/adoption01.dat create mode 100644 tests/html5lib-tests/tree-construction/adoption02.dat create mode 100644 tests/html5lib-tests/tree-construction/blocks.dat create mode 100644 tests/html5lib-tests/tree-construction/comments01.dat create mode 100644 tests/html5lib-tests/tree-construction/doctype01.dat create mode 100644 tests/html5lib-tests/tree-construction/domjs-unsafe.dat create mode 100644 tests/html5lib-tests/tree-construction/entities01.dat create mode 100644 tests/html5lib-tests/tree-construction/entities02.dat create mode 100644 tests/html5lib-tests/tree-construction/foreign-fragment.dat create mode 100644 tests/html5lib-tests/tree-construction/html5test-com.dat create mode 100644 tests/html5lib-tests/tree-construction/inbody01.dat create mode 100644 tests/html5lib-tests/tree-construction/isindex.dat create mode 100644 tests/html5lib-tests/tree-construction/main-element.dat create mode 100644 tests/html5lib-tests/tree-construction/math.dat create mode 100644 tests/html5lib-tests/tree-construction/menuitem-element.dat create mode 100644 tests/html5lib-tests/tree-construction/namespace-sensitivity.dat create mode 100644 tests/html5lib-tests/tree-construction/noscript01.dat create mode 100644 tests/html5lib-tests/tree-construction/pending-spec-changes-plain-text-unsafe.dat create mode 100644 tests/html5lib-tests/tree-construction/pending-spec-changes.dat create mode 100644 tests/html5lib-tests/tree-construction/plain-text-unsafe.dat create mode 100644 tests/html5lib-tests/tree-construction/ruby.dat create mode 100644 tests/html5lib-tests/tree-construction/scriptdata01.dat create mode 100644 tests/html5lib-tests/tree-construction/scripted/adoption01.dat create mode 100644 tests/html5lib-tests/tree-construction/scripted/ark.dat create mode 100644 tests/html5lib-tests/tree-construction/scripted/webkit01.dat create mode 100644 tests/html5lib-tests/tree-construction/svg.dat create mode 100644 tests/html5lib-tests/tree-construction/tables01.dat create mode 100644 tests/html5lib-tests/tree-construction/template.dat create mode 100644 tests/html5lib-tests/tree-construction/tests1.dat create mode 100644 tests/html5lib-tests/tree-construction/tests10.dat create mode 100644 tests/html5lib-tests/tree-construction/tests11.dat create mode 100644 tests/html5lib-tests/tree-construction/tests12.dat create mode 100644 tests/html5lib-tests/tree-construction/tests14.dat create mode 100644 tests/html5lib-tests/tree-construction/tests15.dat create mode 100644 tests/html5lib-tests/tree-construction/tests16.dat create mode 100644 tests/html5lib-tests/tree-construction/tests17.dat create mode 100644 tests/html5lib-tests/tree-construction/tests18.dat create mode 100644 tests/html5lib-tests/tree-construction/tests19.dat create mode 100644 tests/html5lib-tests/tree-construction/tests2.dat create mode 100644 tests/html5lib-tests/tree-construction/tests20.dat create mode 100644 tests/html5lib-tests/tree-construction/tests21.dat create mode 100644 tests/html5lib-tests/tree-construction/tests22.dat create mode 100644 tests/html5lib-tests/tree-construction/tests23.dat create mode 100644 tests/html5lib-tests/tree-construction/tests24.dat create mode 100644 tests/html5lib-tests/tree-construction/tests25.dat create mode 100644 tests/html5lib-tests/tree-construction/tests26.dat create mode 100644 tests/html5lib-tests/tree-construction/tests3.dat create mode 100644 tests/html5lib-tests/tree-construction/tests4.dat create mode 100644 tests/html5lib-tests/tree-construction/tests5.dat create mode 100644 tests/html5lib-tests/tree-construction/tests6.dat create mode 100644 tests/html5lib-tests/tree-construction/tests7.dat create mode 100644 tests/html5lib-tests/tree-construction/tests8.dat create mode 100644 tests/html5lib-tests/tree-construction/tests9.dat create mode 100644 tests/html5lib-tests/tree-construction/tests_innerHTML_1.dat create mode 100644 tests/html5lib-tests/tree-construction/tricky01.dat create mode 100644 tests/html5lib-tests/tree-construction/webkit01.dat create mode 100644 tests/html5lib-tests/tree-construction/webkit02.dat (limited to 'tests/html5lib-tests/tree-construction') diff --git a/tests/html5lib-tests/tree-construction/README.md b/tests/html5lib-tests/tree-construction/README.md new file mode 100644 index 0000000..4737a3a --- /dev/null +++ b/tests/html5lib-tests/tree-construction/README.md @@ -0,0 +1,108 @@ +Tree Construction Tests +======================= + +Each file containing tree construction tests consists of any number of +tests separated by two newlines (LF) and a single newline before the end +of the file. For instance: + + [TEST]LF + LF + [TEST]LF + LF + [TEST]LF + +Where [TEST] is the following format: + +Each test must begin with a string "\#data" followed by a newline (LF). +All subsequent lines until a line that says "\#errors" are the test data +and must be passed to the system being tested unchanged, except with the +final newline (on the last line) removed. + +Then there must be a line that says "\#errors". It must be followed by +one line per parse error that a conformant checker would return. It +doesn't matter what those lines are, although they can't be +"\#new-errors", "\#document-fragment", "\#document", "\#script-off", +"\#script-on", or empty, the only thing that matters is that there be +the right number of parse errors. + +Then there \*may\* be a line that says "\#new-errors", which works like +the "\#errors" section adding more errors to the expected number of +errors. + +Then there \*may\* be a line that says "\#document-fragment", which must +be followed by a newline (LF), followed by a string of characters that +indicates the context element, followed by a newline (LF). If the string +of characters starts with "svg ", the context element is in the SVG +namespace and the substring after "svg " is the local name. If the +string of characters starts with "math ", the context element is in the +MathML namespace and the substring after "math " is the local name. +Otherwise, the context element is in the HTML namespace and the string +is the local name. If this line is present the "\#data" must be parsed +using the HTML fragment parsing algorithm with the context element as +context. + +Then there \*may\* be a line that says "\#script-off" or +"\#script-on". If a line that says "\#script-off" is present, the +parser must set the scripting flag to disabled. If a line that says +"\#script-on" is present, it must set it to enabled. Otherwise, the +test should be run in both modes. + +Then there must be a line that says "\#document", which must be followed +by a dump of the tree of the parsed DOM. Each node must be represented +by a single line. Each line must start with "| ", followed by two spaces +per parent node that the node has before the root document node. + +- Element nodes must be represented by a "`<`" then the *tag name + string* "`>`", and all the attributes must be given, sorted + lexicographically by UTF-16 code unit according to their *attribute + name string*, on subsequent lines, as if they were children of the + element node. +- Attribute nodes must have the *attribute name string*, then an "=" + sign, then the attribute value in double quotes ("). +- Text nodes must be the string, in double quotes. Newlines aren't + escaped. +- Comments must be "`<`" then "`!-- `" then the data then "` -->`". +- DOCTYPEs must be "``". +- Processing instructions must be "``". (The HTML parser cannot emit + processing instructions, but scripts can, and the WebVTT to DOM + rules can emit them.) +- Template contents are represented by the string "content" with the + children below it. + +The *tag name string* is the local name prefixed by a namespace +designator. For the HTML namespace, the namespace designator is the +empty string, i.e. there's no prefix. For the SVG namespace, the +namespace designator is "svg ". For the MathML namespace, the namespace +designator is "math ". + +The *attribute name string* is the local name prefixed by a namespace +designator. For no namespace, the namespace designator is the empty +string, i.e. there's no prefix. For the XLink namespace, the namespace +designator is "xlink ". For the XML namespace, the namespace designator +is "xml ". For the XMLNS namespace, the namespace designator is "xmlns +". Note the difference between "xlink:href" which is an attribute in no +namespace with the local name "xlink:href" and "xlink href" which is an +attribute in the xlink namespace with the local name "href". + +If there is also a "\#document-fragment" the bit following "\#document" +must be a representation of the HTML fragment serialization for the +context element given by "\#document-fragment". + +For example: + + #data +

One

Two + #errors + 3: Missing document type declaration + #document + | + | + | + |

+ | "One" + |

+ | "Two" diff --git a/tests/html5lib-tests/tree-construction/adoption01.dat b/tests/html5lib-tests/tree-construction/adoption01.dat new file mode 100644 index 0000000..38f98ef --- /dev/null +++ b/tests/html5lib-tests/tree-construction/adoption01.dat @@ -0,0 +1,354 @@ +#data +

+#errors +(1,3): expected-doctype-but-got-start-tag +(1,10): adoption-agency-1.3 +#document +| +| +| +| +|

+| + +#data +1

23

+#errors +(1,3): expected-doctype-but-got-start-tag +(1,12): adoption-agency-1.3 +#document +| +| +| +| +| "1" +|

+| +| "2" +| "3" + +#data +1 +#errors +(1,3): expected-doctype-but-got-start-tag +(1,17): adoption-agency-1.3 +#document +| +| +| +| +| "1" +|