mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2026-02-20 15:16:28 +00:00
test: fixes test for NBSP (non-break space)
This fixes the example "Example 5.13 Escaped Characters" from the YAML specification. The example demands that `\_` is being translated to unicode `\u00a0`. The unicode codepoint `\u00A0` encoded for utf-8 in hex is `\xC2\xA0`. Fixing this test case will cause the unit test to not pass, since the codepoint `\u00A0` is not handled correctly. (Failing unittest is expected).
This commit is contained in:
committed by
Jesse Beder
parent
f25f110e33
commit
3e53605a31
@@ -751,7 +751,7 @@ TEST_F(HandlerSpecTest, Ex5_13_EscapedCharacters) {
|
||||
OnScalar(_, "!", 0,
|
||||
"Fun with \x5C \x22 \x07 \x08 \x1B \x0C \x0A \x0D \x09 \x0B " +
|
||||
std::string("\x00", 1) +
|
||||
" \x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9 A A A"));
|
||||
" \x20 \xC2\xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9 A A A"));
|
||||
EXPECT_CALL(handler, OnDocumentEnd());
|
||||
Parse(ex5_13);
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ TEST(NodeSpecTest, Ex5_13_EscapedCharacters) {
|
||||
EXPECT_TRUE(doc.as<std::string>() ==
|
||||
"Fun with \x5C \x22 \x07 \x08 \x1B \x0C \x0A \x0D \x09 \x0B " +
|
||||
std::string("\x00", 1) +
|
||||
" \x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9 A A A");
|
||||
" \x20 \xC2\xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9 A A A");
|
||||
}
|
||||
|
||||
TEST(NodeSpecTest, Ex5_14_InvalidEscapedCharacters) {
|
||||
|
||||
Reference in New Issue
Block a user