]> granicus.if.org Git - libexpat/commitdiff
Fix test_utf8_in_cdata_section() to work in UTF-16 builds
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 22 Aug 2017 16:12:58 +0000 (17:12 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 29 Aug 2017 21:13:14 +0000 (23:13 +0200)
expat/tests/runtests.c

index 7b2991bde6845290bee60087f6f7ec474aae8d7f..a14f956ba74c77f02c6364292d396154052de0ff 100644 (file)
@@ -6478,7 +6478,11 @@ END_TEST
 START_TEST(test_utf8_in_cdata_section)
 {
     const char *text = "<doc><![CDATA[one \xc3\xa9 two]]></doc>";
-    const XML_Char *expected = "one \xc3\xa9 two";
+#ifdef XML_UNICODE
+    const XML_Char *expected = XCS("one \x00e9 two");
+#else
+    const XML_Char *expected = XCS("one \xc3\xa9 two");
+#endif
 
     run_character_check(text, expected);
 }