From 99ad0530b719094b726b748b9861ee19838005e2 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 13 Feb 2015 03:05:09 +0000 Subject: [PATCH] expand xml parser unit test --- test/test_xml.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_xml.cpp b/test/test_xml.cpp index 23323821b..2ea9be78b 100644 --- a/test/test_xml.cpp +++ b/test/test_xml.cpp @@ -370,6 +370,17 @@ int test_main() TEST_CHECK(out == "Punexpected end of file"); } + { + // test CDATA tag + char xml[] = " and < in it]]>"; + std::string out; + + xml_parse(xml, xml + sizeof(xml) - 1, boost::bind(&parser_callback + , boost::ref(out), _1, _2, _3)); + std::cerr << out << std::endl; + TEST_CHECK(out == "Sverbatim tag that can have > and < in it"); + } + { // test unterminated tags char xml[] = "