]> granicus.if.org Git - libexpat/commitdiff
Fix test_french_charref_hexidecimal() to work for UTF-16
authorRhodri James <rhodri@kynesim.co.uk>
Fri, 4 Aug 2017 17:40:01 +0000 (18:40 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 29 Aug 2017 20:30:33 +0000 (22:30 +0200)
expat/tests/runtests.c

index bca3b1c3f9bb58a0b9c7133f8bb147b204a13646..88a8ae940cfe569c743448d36e6e6ef462e2bb90 100644 (file)
@@ -673,8 +673,14 @@ START_TEST(test_french_charref_hexidecimal)
     const char *text =
         "<?xml version='1.0' encoding='iso-8859-1'?>\n"
         "<doc>&#xE9;&#xE8;&#xE0;&#xE7;&#xEA;&#xC8;</doc>";
-    run_character_check(text,
-                        "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88");
+#ifdef XML_UNICODE
+    const XML_Char *expected =
+        XCS("\x00e9\x00e8\x00e0\x00e7\x00ea\x00c8");
+#else
+    const XML_Char *expected =
+        XCS("\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88");
+#endif
+    run_character_check(text, expected);
 }
 END_TEST