[libxml2] test coverage for abruptly-closed comments
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] test coverage for abruptly-closed comments
- Date: Wed, 2 Mar 2022 14:48:31 +0000 (UTC)
commit 24cdc89006a49ebda93a6c9301f7fe07f353f40e
Author: Mike Dalessio <mike dalessio gmail com>
Date: Sat Jul 17 14:06:49 2021 -0400
test coverage for abruptly-closed comments
These establish baseline behavior so that the subsequent commit is
clear about the behavior it will modify.
result/HTML/comments3.html | 18 +++++++++++++++
result/HTML/comments3.html.err | 0
result/HTML/comments3.html.sax | 51 ++++++++++++++++++++++++++++++++++++++++++
test/HTML/comments3.html | 17 ++++++++++++++
4 files changed, 86 insertions(+)
---
diff --git a/result/HTML/comments3.html b/result/HTML/comments3.html
new file mode 100644
index 00000000..537d3105
--- /dev/null
+++ b/result/HTML/comments3.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+ <body>
+ <div>
+ <h3>
+ <a
href="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment">
+ Abruptly closed comment
+ </a>
+ </h3>
+ <div>
+ <!-->the previous node should be an empty comment, and this should be a text node-->
+ </div>
+ <div>
+ <!--->the previous node should be an empty comment, and this should be a text node-->
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/result/HTML/comments3.html.err b/result/HTML/comments3.html.err
new file mode 100644
index 00000000..e69de29b
diff --git a/result/HTML/comments3.html.sax b/result/HTML/comments3.html.sax
new file mode 100644
index 00000000..310bac56
--- /dev/null
+++ b/result/HTML/comments3.html.sax
@@ -0,0 +1,51 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(html)
+SAX.characters(
+ , 3)
+SAX.startElement(body)
+SAX.characters(
+ , 5)
+SAX.startElement(div)
+SAX.characters(
+ , 7)
+SAX.startElement(h3)
+SAX.characters(
+ , 9)
+SAX.startElement(a,
href='https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment')
+SAX.characters(
+ Abruptly closed com, 43)
+SAX.endElement(a)
+SAX.characters(
+ , 7)
+SAX.endElement(h3)
+SAX.characters(
+ , 7)
+SAX.startElement(div)
+SAX.characters(
+ , 9)
+SAX.comment(>the previous node should be an empty comment, and this should be a text node)
+SAX.characters(
+ , 7)
+SAX.endElement(div)
+SAX.characters(
+ , 7)
+SAX.startElement(div)
+SAX.characters(
+ , 9)
+SAX.comment(->the previous node should be an empty comment, and this should be a text node)
+SAX.characters(
+ , 7)
+SAX.endElement(div)
+SAX.characters(
+ , 5)
+SAX.endElement(div)
+SAX.characters(
+ , 3)
+SAX.endElement(body)
+SAX.characters(
+, 1)
+SAX.endElement(html)
+SAX.characters(
+, 1)
+SAX.endDocument()
diff --git a/test/HTML/comments3.html b/test/HTML/comments3.html
new file mode 100644
index 00000000..327633e7
--- /dev/null
+++ b/test/HTML/comments3.html
@@ -0,0 +1,17 @@
+<html>
+ <body>
+ <div>
+ <h3>
+ <a
href="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment">
+ Abruptly closed comment
+ </a>
+ </h3>
+ <div>
+ <!-->the previous node should be an empty comment, and this should be a text node-->
+ </div>
+ <div>
+ <!--->the previous node should be an empty comment, and this should be a text node-->
+ </div>
+ </div>
+ </body>
+</html>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]