From a84705afc201a7641f27b98e1e687d5f618e4aa5 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Fri, 7 Apr 2017 18:29:18 +0100 Subject: [PATCH] Test attribute value with trailing CR --- expat/tests/runtests.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 7bc76695..a02aeff8 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -4781,6 +4781,16 @@ START_TEST(test_reject_unfinished_param_in_att_value) } END_TEST +START_TEST(test_trailing_cr_in_att_value) +{ + const char *text = ""; + + if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), + XML_TRUE) == XML_STATUS_ERROR) + xml_failure(parser); +} +END_TEST + /* * Namespaces tests. @@ -8203,6 +8213,7 @@ make_suite(void) tcase_add_test(tc_basic, test_restart_on_error); tcase_add_test(tc_basic, test_reject_lt_in_attribute_value); tcase_add_test(tc_basic, test_reject_unfinished_param_in_att_value); + tcase_add_test(tc_basic, test_trailing_cr_in_att_value); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,