From 2767bf73b1a53029e36b43dd6a614abe9f1ac376 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 18 Jan 2019 07:44:33 -0500 Subject: [PATCH] Add CDATA test of varying lengths, as it looks like we might have yet another MS C runtime issue with va_copy... :/ --- testmxml.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/testmxml.c b/testmxml.c index 5856df6..645c391 100644 --- a/testmxml.c +++ b/testmxml.c @@ -124,6 +124,22 @@ main(int argc, /* I - Number of command-line args */ MXML_OPAQUE_CALLBACK); mxmlLoadString(tree, "valuevalue2" "", 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);