diff options
author | kerzum <kerzum@yandex-team.ru> | 2022-02-10 16:49:33 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:33 +0300 |
commit | 9a7232babfd763ccfe827bc70e82e0f50cfd8276 (patch) | |
tree | a39808b7482c4711a80f799a7281adb36d76a13a /util/string/escape_ut.cpp | |
parent | 0e68ae909d3b76a5a001a07880eb0010dec6b2ea (diff) | |
download | ydb-9a7232babfd763ccfe827bc70e82e0f50cfd8276.tar.gz |
Restoring authorship annotation for <kerzum@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/escape_ut.cpp')
-rw-r--r-- | util/string/escape_ut.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/string/escape_ut.cpp b/util/string/escape_ut.cpp index cd38ecffd3..49fb122972 100644 --- a/util/string/escape_ut.cpp +++ b/util/string/escape_ut.cpp @@ -41,7 +41,7 @@ static const TExample CommonTestData[] = { {"Slash\\\\dash!", "Slash\\dash!"}, {R"(There\nare\r\nnewlines.)", "There\nare\r\nnewlines."}, {"There\\tare\\ttabs.", "There\tare\ttabs."}, - + {"There are questions \\x3F\\x3F?", "There are questions ???"}, {"There are questions \\x3F?", "There are questions ??"}, }; @@ -94,15 +94,15 @@ Y_UNIT_TEST_SUITE(TEscapeCTest) { UNIT_ASSERT_VALUES_EQUAL(u"h", EscapeC(u'h')); UNIT_ASSERT_VALUES_EQUAL(u"\\xFF", EscapeC(wchar16(255))); } - + Y_UNIT_TEST(TestEscapeTrigraphs) { UNIT_ASSERT_VALUES_EQUAL("?", EscapeC(TString("?"))); UNIT_ASSERT_VALUES_EQUAL("\\x3F?", EscapeC(TString("??"))); UNIT_ASSERT_VALUES_EQUAL("\\x3F\\x3F?", EscapeC(TString("???"))); - // ok but may cause warning about trigraphs + // ok but may cause warning about trigraphs // UNIT_ASSERT_VALUES_EQUAL("[x]?z", EscapeC(TString("??(x??)?z"))); UNIT_ASSERT_VALUES_EQUAL("\\x3F?x\\x3F\\x3F?z", EscapeC(TString("??x???z"))); - } + } Y_UNIT_TEST(TestUnescapeCCharLen) { auto test = [](const char* str, size_t len) { |