[Expat-checkins] expat/tests runtests.c,1.43,1.44
Karl Waclawek
karl at waclawek.net
Fri Jan 24 10:06:44 EST 2003
Fred,
you said the test didn't work for you.
This patch doesn't show if the parser instance you are using
was created with namespace processing turned on.
Karl
----- Original Message -----
From: "Fred L. Drake" <fdrake at users.sourceforge.net>
To: <expat-checkins at libexpat.org>
Sent: Friday, January 24, 2003 12:09 AM
Subject: [Expat-checkins] expat/tests runtests.c,1.43,1.44
> Update of /cvsroot/expat/expat/tests
> In directory sc8-pr-cvs1:/tmp/cvs-serv14134
>
> Modified Files:
> runtests.c
> Log Message:
> Add a test that makes sure xmlns:prefix="" is allowed when namespace
> processing is not enabled.
>
>
> Index: runtests.c
> ===================================================================
> RCS file: /cvsroot/expat/expat/tests/runtests.c,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -u -d -r1.43 -r1.44
> --- runtests.c 21 Jan 2003 05:41:24 -0000 1.43
> +++ runtests.c 24 Jan 2003 05:09:42 -0000 1.44
> @@ -906,6 +906,24 @@
> }
> END_TEST
>
> +/* See related SF bug #673791.
> + When namespace processing is enabled, setting the namespace URI for
> + a prefix is not allowed; this test ensures that it *is* allowed
> + when namespace processing is not enabled.
> + (See Namespaces in XML, section 2.)
> +*/
> +START_TEST(test_empty_ns_without_namespaces)
> +{
> + char *text =
> + "<doc xmlns:prefix='http://www.example.com/'>\n"
> + " <e xmlns:prefix=''/>\n"
> + "</doc>";
> +
> + if (XML_Parse(parser, text, strlen(text), 1) == XML_STATUS_ERROR)
> + xml_failure(parser);
> +}
> +END_TEST
> +
>
> /*
> * Namespaces tests.
> @@ -1189,6 +1207,7 @@
> tcase_add_test(tc_basic, test_wfc_no_recursive_entity_refs);
> tcase_add_test(tc_basic, test_ext_entity_set_encoding);
> tcase_add_test(tc_basic, test_dtd_default_handling);
> + tcase_add_test(tc_basic, test_empty_ns_without_namespaces);
>
> suite_add_tcase(s, tc_namespace);
> tcase_add_checked_fixture(tc_namespace,
>
>
>
> _______________________________________________
> Expat-checkins mailing list
> Expat-checkins at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-checkins
>
More information about the Expat-checkins
mailing list