mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 18:35:40 +02:00
Produce valid xml and preserve utf8 characters in attributes
This commit is contained in:
@@ -458,10 +458,16 @@ 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]" ) == "[]" );
|
||||
}
|
||||
SECTION( "string with control char (x7F)" ) {
|
||||
REQUIRE( encode( "[\x7F]" ) == "[]" );
|
||||
REQUIRE( encode( "[\x7F]" ) == "[]" );
|
||||
}
|
||||
SECTION( "string with control char that is negativ on signed char (xFF)" ) {
|
||||
REQUIRE( encode( "[\xFF]" ) == "[ÿ]" );
|
||||
}
|
||||
SECTION( "string with utf8 multi byte char (german 'ae' umlaut)" ) {
|
||||
REQUIRE( encode( "[\xC3\xA4]" ) == "[\xC3\xA4]" );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user