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

index 06c1ed20022343410a633caf35c29327e44adc58..ad3fd9c1977767545f223c2e67be9e00d1d5fe39 100644 (file)
@@ -655,8 +655,14 @@ START_TEST(test_danish_latin1)
     const char *text =
         "<?xml version='1.0' encoding='iso-8859-1'?>\n"
         "<e>J\xF8rgen \xE6\xF8\xE5\xC6\xD8\xC5</e>";
-    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