aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/quote/quote_ut.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/string_utils/quote/quote_ut.cpp
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/quote/quote_ut.cpp')
-rw-r--r--library/cpp/string_utils/quote/quote_ut.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/string_utils/quote/quote_ut.cpp b/library/cpp/string_utils/quote/quote_ut.cpp
index 6c552b279e..b89a9525a2 100644
--- a/library/cpp/string_utils/quote/quote_ut.cpp
+++ b/library/cpp/string_utils/quote/quote_ut.cpp
@@ -1,7 +1,7 @@
-#include "quote.h"
-
+#include "quote.h"
+
#include <library/cpp/testing/unittest/registar.h>
-
+
Y_UNIT_TEST_SUITE(TCGIEscapeTest) {
Y_UNIT_TEST(ReturnsEndOfTo) {
char r[10];
@@ -9,21 +9,21 @@ Y_UNIT_TEST_SUITE(TCGIEscapeTest) {
UNIT_ASSERT_VALUES_EQUAL(r + strlen("123"), returned);
UNIT_ASSERT_VALUES_EQUAL('\0', *returned);
}
-
+
Y_UNIT_TEST(NotZeroTerminated) {
- char r[] = {'1', '2', '3', '4'};
- char buf[sizeof(r) * 3 + 2];
-
+ char r[] = {'1', '2', '3', '4'};
+ char buf[sizeof(r) * 3 + 2];
+
TString ret(buf, CGIEscape(buf, r, sizeof(r)));
-
- UNIT_ASSERT_EQUAL(ret, "1234");
- }
-
+
+ UNIT_ASSERT_EQUAL(ret, "1234");
+ }
+
Y_UNIT_TEST(StringBuf) {
- char tmp[100];
-
+ char tmp[100];
+
UNIT_ASSERT_VALUES_EQUAL(CgiEscape(tmp, "!@#$%^&*(){}[]\" "), TStringBuf("!@%23$%25^%26*%28%29%7B%7D%5B%5D%22+"));
- }
+ }
Y_UNIT_TEST(StrokaRet) {
UNIT_ASSERT_VALUES_EQUAL(CGIEscapeRet("!@#$%^&*(){}[]\" "), TString("!@%23$%25^%26*%28%29%7B%7D%5B%5D%22+"));
@@ -49,11 +49,11 @@ Y_UNIT_TEST_SUITE(TCGIEscapeTest) {
Y_UNIT_TEST_SUITE(TCGIUnescapeTest) {
Y_UNIT_TEST(StringBuf) {
- char tmp[100];
-
+ char tmp[100];
+
UNIT_ASSERT_VALUES_EQUAL(CgiUnescape(tmp, "!@%23$%25^%26*%28%29"), TStringBuf("!@#$%^&*()"));
- }
-
+ }
+
Y_UNIT_TEST(TestValidZeroTerm) {
char r[10];