From e4ca396c1cffc546ea905cd18b022a0ba9d28bf5 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 22 Aug 2017 13:22:39 +0100 Subject: [PATCH] Fix test_ext_entity_set_bom() to work for UTF-16 --- expat/tests/runtests.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 7fa56920..c3d76dc3 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -1628,9 +1628,14 @@ START_TEST(test_ext_entity_set_bom) XCS("utf-8"), NULL }; +#ifdef XML_UNICODE + const XML_Char *expected = XCS("\x00e9"); +#else + const XML_Char *expected = XCS("\xc3\xa9"); +#endif XML_SetExternalEntityRefHandler(parser, external_entity_loader); - run_ext_character_check(text, &test_data, "\xC3\xA9"); + run_ext_character_check(text, &test_data, expected); } END_TEST