diff options
author | pkalinnikov <pkalinnikov@yandex-team.ru> | 2022-02-10 16:50:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:15 +0300 |
commit | d507a9366b2ab84411afe63fea9fba5498891e1b (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/string/escape_ut.cpp | |
parent | 9e33e026829d561d6fd46d72b88c367952e08075 (diff) | |
download | ydb-d507a9366b2ab84411afe63fea9fba5498891e1b.tar.gz |
Restoring authorship annotation for <pkalinnikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/string/escape_ut.cpp')
-rw-r--r-- | util/string/escape_ut.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/util/string/escape_ut.cpp b/util/string/escape_ut.cpp index c3e6e3a05b..cd38ecffd3 100644 --- a/util/string/escape_ut.cpp +++ b/util/string/escape_ut.cpp @@ -103,33 +103,33 @@ Y_UNIT_TEST_SUITE(TEscapeCTest) { // 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) { - UNIT_ASSERT_EQUAL(UnescapeCCharLen(str, str + strlen(str)), len); - }; - - test("", 0); - test("abc", 1); - test("\\", 1); - test("\\\\", 2); - test("\\#", 2); - test("\\n10", 2); - test("\\r\\n", 2); - test("\\x05abc", 4); - test("\\u11117777", 6); - test("\\u123yyy", 2); - test("\\U11117777cccc", 10); - test("\\U111yyy", 2); - test("\\0\\1", 2); - test("\\01\\1", 3); - test("\\012\\1", 4); - test("\\0123\\1", 4); - test("\\4\\1", 2); - test("\\40\\1", 3); - test("\\400\\1", 3); - test("\\4xxx", 2); - } + auto test = [](const char* str, size_t len) { + UNIT_ASSERT_EQUAL(UnescapeCCharLen(str, str + strlen(str)), len); + }; + + test("", 0); + test("abc", 1); + test("\\", 1); + test("\\\\", 2); + test("\\#", 2); + test("\\n10", 2); + test("\\r\\n", 2); + test("\\x05abc", 4); + test("\\u11117777", 6); + test("\\u123yyy", 2); + test("\\U11117777cccc", 10); + test("\\U111yyy", 2); + test("\\0\\1", 2); + test("\\01\\1", 3); + test("\\012\\1", 4); + test("\\0123\\1", 4); + test("\\4\\1", 2); + test("\\40\\1", 3); + test("\\400\\1", 3); + test("\\4xxx", 2); + } Y_UNIT_TEST(TestUnbounded) { char buf[100000]; |