From 9528e62a1efbc903d17c416d8f873112fd3d718a Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Thu, 16 Mar 2017 17:20:04 +0000 Subject: [PATCH] Test aborting in the epilog not from a CR character --- expat/tests/runtests.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index e9622cf8..dc7a5228 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -4566,6 +4566,19 @@ START_TEST(test_abort_epilog) } END_TEST +/* Test a different code path for abort in the epilog */ +START_TEST(test_abort_epilog_2) +{ + const char *text = "\n"; + char match[] = "\n"; + + XML_SetDefaultHandler(parser, selective_aborting_default_handler); + XML_SetUserData(parser, match); + resumable = XML_FALSE; + expect_failure(text, XML_ERROR_ABORTED, "Abort not triggered"); +} +END_TEST + START_TEST(test_unfinished_epilog) { const char *text = "<"; @@ -7855,6 +7868,7 @@ make_suite(void) tcase_add_test(tc_basic, test_undefined_ext_entity_in_external_dtd); tcase_add_test(tc_basic, test_suspend_xdecl); tcase_add_test(tc_basic, test_abort_epilog); + tcase_add_test(tc_basic, test_abort_epilog_2); tcase_add_test(tc_basic, test_unfinished_epilog); tcase_add_test(tc_basic, test_partial_char_in_epilog);