From: Rhodri James Date: Fri, 4 Aug 2017 17:27:10 +0000 (+0100) Subject: Fix test_danish_latin1() to handle UTF-16 X-Git-Tag: R_2_2_5~24^2~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87899c4ff175f268187296bd201698727fbe26fd;p=libexpat Fix test_danish_latin1() to handle UTF-16 --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 06c1ed20..ad3fd9c1 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -655,8 +655,14 @@ START_TEST(test_danish_latin1) const char *text = "\n" "J\xF8rgen \xE6\xF8\xE5\xC6\xD8\xC5"; - run_character_check(text, - "J\xC3\xB8rgen \xC3\xA6\xC3\xB8\xC3\xA5\xC3\x86\xC3\x98\xC3\x85"); +#ifdef XML_UNICODE + const XML_Char *expected = + XCS("J\x00f8rgen \x00e6\x00f8\x00e5\x00c6\x00d8\x00c5"); +#else + const XML_Char *expected = + XCS("J\xC3\xB8rgen \xC3\xA6\xC3\xB8\xC3\xA5\xC3\x86\xC3\x98\xC3\x85"); +#endif + run_character_check(text, expected); } END_TEST