aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/quote/quote_ut.cpp
diff options
context:
space:
mode:
authorsamoleg <samoleg@yandex-team.ru>2022-02-10 16:49:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:57 +0300
commit5dcbab5666d82d448111d17b7045c46b56ef5172 (patch)
tree7faed34125c4c1a9bf0e0707ec6daf9695d5135d /library/cpp/string_utils/quote/quote_ut.cpp
parentaf7786701134cfc2bd577c1c39bbc39433b555d6 (diff)
downloadydb-5dcbab5666d82d448111d17b7045c46b56ef5172.tar.gz
Restoring authorship annotation for <samoleg@yandex-team.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.cpp198
1 files changed, 99 insertions, 99 deletions
diff --git a/library/cpp/string_utils/quote/quote_ut.cpp b/library/cpp/string_utils/quote/quote_ut.cpp
index 6c552b279e..5b20c45bbd 100644
--- a/library/cpp/string_utils/quote/quote_ut.cpp
+++ b/library/cpp/string_utils/quote/quote_ut.cpp
@@ -123,59 +123,59 @@ Y_UNIT_TEST_SUITE(TCGIUnescapeTest) {
CGIUnescape(r, "%3u1234", 4);
UNIT_ASSERT_VALUES_EQUAL(r, "%3u1");
}
-
+
Y_UNIT_TEST(StrokaOutParameterInplace) {
TString s;
-
- s = "hello%3dworld";
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
-
- s = "+%23+";
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, " # ");
-
- s = "hello%3u";
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
-
- s = "0123456789012345";
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
-
- s = "";
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "");
- }
-
+
+ s = "hello%3dworld";
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
+
+ s = "+%23+";
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, " # ");
+
+ s = "hello%3u";
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
+
+ s = "0123456789012345";
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
+
+ s = "";
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "");
+ }
+
Y_UNIT_TEST(StrokaOutParameterNotInplace) {
TString s, sCopy;
-
- s = "hello%3dworld";
- sCopy = s;
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
-
- s = "+%23+";
- sCopy = s;
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, " # ");
-
- s = "hello%3u";
- sCopy = s;
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
-
- s = "0123456789012345";
- sCopy = s;
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
-
- s = "";
- sCopy = s;
- CGIUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "");
- }
+
+ s = "hello%3dworld";
+ sCopy = s;
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
+
+ s = "+%23+";
+ sCopy = s;
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, " # ");
+
+ s = "hello%3u";
+ sCopy = s;
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
+
+ s = "0123456789012345";
+ sCopy = s;
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
+
+ s = "";
+ sCopy = s;
+ CGIUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "");
+ }
}
Y_UNIT_TEST_SUITE(TUrlEscapeTest) {
@@ -233,58 +233,58 @@ Y_UNIT_TEST_SUITE(TUrlEscapeTest) {
Y_UNIT_TEST_SUITE(TUrlUnescapeTest) {
Y_UNIT_TEST(StrokaOutParameterInplace) {
TString s;
-
- s = "hello%3dworld";
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
-
- s = "+%23+";
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "+#+");
-
- s = "hello%3u";
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
-
- s = "0123456789012345";
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
-
- s = "";
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "");
- }
-
+
+ s = "hello%3dworld";
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
+
+ s = "+%23+";
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "+#+");
+
+ s = "hello%3u";
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
+
+ s = "0123456789012345";
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
+
+ s = "";
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "");
+ }
+
Y_UNIT_TEST(StrokaOutParameterNotInplace) {
TString s, sCopy;
-
- s = "hello%3dworld";
- sCopy = s;
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
-
- s = "+%23+";
- sCopy = s;
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "+#+");
-
- s = "hello%3u";
- sCopy = s;
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
-
- s = "0123456789012345";
- sCopy = s;
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
-
- s = "";
- sCopy = s;
- UrlUnescape(s);
- UNIT_ASSERT_VALUES_EQUAL(s, "");
- }
-}
-
+
+ s = "hello%3dworld";
+ sCopy = s;
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello=world");
+
+ s = "+%23+";
+ sCopy = s;
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "+#+");
+
+ s = "hello%3u";
+ sCopy = s;
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "hello%3u");
+
+ s = "0123456789012345";
+ sCopy = s;
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "0123456789012345");
+
+ s = "";
+ sCopy = s;
+ UrlUnescape(s);
+ UNIT_ASSERT_VALUES_EQUAL(s, "");
+ }
+}
+
Y_UNIT_TEST_SUITE(TQuoteTest) {
Y_UNIT_TEST(ReturnsEndOfTo) {
char r[10];