From: Fred L. Drake, Jr. Date: Sat, 24 Aug 2002 19:53:59 +0000 (+0000) Subject: Add test for well-formedness constraint: No Recursion. X-Git-Tag: R_1_95_5~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a37a37af7f068b1046b9ff65b530705b2faaf7cb;p=libexpat Add test for well-formedness constraint: No Recursion. --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index f6ff2d44..e072c14d 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -590,6 +590,20 @@ START_TEST(test_wfc_undeclared_entity_with_external_subset) { } END_TEST +START_TEST(test_wfc_no_recursive_entity_refs) +{ + char *text = + "\n" + "]>\n" + "&entity;"; + + expect_failure(text, + XML_ERROR_RECURSIVE_ENTITY_REF, + "Parser did not report recursive entity reference."); +} +END_TEST + /* * Namespaces tests. @@ -777,6 +791,7 @@ make_basic_suite(void) tcase_add_test(tc_basic, test_wfc_undeclared_entity_no_external_subset); tcase_add_test(tc_basic, test_wfc_undeclared_entity_standalone); tcase_add_test(tc_basic, test_wfc_undeclared_entity_with_external_subset); + tcase_add_test(tc_basic, test_wfc_no_recursive_entity_refs); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,