XmlWriter reverts to XML 1.0.

Character encodings that are not valid in XML 1.0 are instead written using C-style escapes
This commit is contained in:
Phil Nash
2017-02-06 16:00:05 +00:00
parent 7db4d8d90c
commit 1f271c9944
5 changed files with 36 additions and 40 deletions

View File

@@ -458,10 +458,10 @@ TEST_CASE( "XmlEncode" ) {
REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" );
}
SECTION( "string with control char (1)" ) {
REQUIRE( encode( "[\x01]" ) == "[]" );
REQUIRE( encode( "[\x01]" ) == "[\\x01]" );
}
SECTION( "string with control char (x7F)" ) {
REQUIRE( encode( "[\x7F]" ) == "[]" );
REQUIRE( encode( "[\x7F]" ) == "[\\x7F]" );
}
}