diff --git a/src/web/vaev-markup/tests/test-xhtml-parser.cpp b/src/web/vaev-markup/tests/test-xhtml-parser.cpp
index da018c8..d60c749 100644
--- a/src/web/vaev-markup/tests/test-xhtml-parser.cpp
+++ b/src/web/vaev-markup/tests/test-xhtml-parser.cpp
@@ -156,4 +156,33 @@ test$("parse-doctype") {
return Ok();
}
+test$("parse-title") {
+ auto s = Io::SScan("
the title");
+ XmlParser p{};
+ auto dom = makeStrong(Mime::Url());
+ try$(p.parse(s, Vaev::HTML, *dom));
+ expect$(dom->title() == "the title");
+ return Ok();
+}
+
+test$("parse-comment-with-gt-symb") {
+ auto s = Io::SScan(
+ "im a title!"
+ ""
+ );
+ XmlParser p{};
+ auto dom = makeStrong(Mime::Url());
+ try$(p.parse(s, Vaev::HTML, *dom));
+
+ expect$(dom->hasChildren());
+ auto title = dom->firstChild();
+ expect$(title->nodeType() == NodeType::ELEMENT);
+
+ auto comment = title->nextSibling();
+ expect$(comment->nodeType() == NodeType::COMMENT);
+ expect$(try$(comment.cast())->data == " a b c d ");
+
+ return Ok();
+}
+
} // namespace Vaev::Markup::Tests