expat/tests runtests.c,1.43,1.44
"Fred L. Drake" <[email protected]>
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
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,