Add CDATA test of varying lengths, as it looks like we might have yet another

MS C runtime issue with va_copy... :/
This commit is contained in:
Michael R Sweet 2019-01-18 07:44:33 -05:00
parent c07d6fc9ab
commit 2767bf73b1
No known key found for this signature in database
GPG Key ID: 999559A027815955

View File

@ -124,6 +124,22 @@ main(int argc, /* I - Number of command-line args */
MXML_OPAQUE_CALLBACK);
mxmlLoadString(tree, "<foo><bar><one><two>value<two>value2</two></two></one>"
"</bar></foo>", MXML_OPAQUE_CALLBACK);
mxmlNewCDATA(tree,
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n");
mxmlNewCDATA(tree,
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n");
mxmlNewCDATA(tree,
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n"
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n");
node = tree->child;
@ -310,10 +326,10 @@ main(int argc, /* I - Number of command-line args */
return (1);
}
if (ind->num_nodes != 10)
if (ind->num_nodes != 13)
{
fprintf(stderr, "ERROR: Index of all nodes contains %d "
"nodes; expected 10.\n", ind->num_nodes);
"nodes; expected 13.\n", ind->num_nodes);
mxmlIndexDelete(ind);
mxmlDelete(tree);
return (1);
@ -418,7 +434,7 @@ main(int argc, /* I - Number of command-line args */
* Check the mxmlDelete() works properly...
*/
for (i = 0; i < 9; i ++)
for (i = 0; i < 12; i ++)
{
if (tree->child)
mxmlDelete(tree->child);