diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index bda2e6b3..a3befc85 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -2394,7 +2394,10 @@ START_TEST(test_explicit_encoding) const char *text1 = "Hello "; const char *text2 = " World"; - /* First say we are UTF-8 */ + /* Just check that we can set the encoding to NULL before starting */ + if (XML_SetEncoding(parser, NULL) != XML_STATUS_OK) + fail("Failed to initialise encoding to NULL"); + /* Say we are UTF-8 */ if (XML_SetEncoding(parser, "utf-8") != XML_STATUS_OK) fail("Failed to set explicit encoding"); if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),