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:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/string_utils/quote/quote_ut.cpp
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 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 b89a9525a2..6c552b279e 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];