expand xml parser unit test

This commit is contained in:
Arvid Norberg 2015-02-13 03:05:09 +00:00
parent 51f1a61d2d
commit 99ad0530b7
1 changed files with 11 additions and 0 deletions

View File

@ -370,6 +370,17 @@ int test_main()
TEST_CHECK(out == "Punexpected end of file");
}
{
// test CDATA tag
char xml[] = "<![CDATA[verbatim tag that can have > 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[] = "<foo";