diff options
author | olegator <olegator@yandex-team.ru> | 2022-02-10 16:49:55 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:55 +0300 |
commit | 971cfa1c440a14ae8352b1dbf29a884fea7536db (patch) | |
tree | e03e5f1c971e2c7a8e7ba6b0c982587b9191503e /library/cpp/string_utils/url/url_ut.cpp | |
parent | c1979c2381cc77360b23e68225994f4b343e5acc (diff) | |
download | ydb-971cfa1c440a14ae8352b1dbf29a884fea7536db.tar.gz |
Restoring authorship annotation for <olegator@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url_ut.cpp')
-rw-r--r-- | library/cpp/string_utils/url/url_ut.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/string_utils/url/url_ut.cpp b/library/cpp/string_utils/url/url_ut.cpp index 1588013893..d0971b1007 100644 --- a/library/cpp/string_utils/url/url_ut.cpp +++ b/library/cpp/string_utils/url/url_ut.cpp @@ -128,29 +128,29 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) { } Y_UNIT_TEST(TestSplitUrlToHostAndPath) { - TStringBuf host, path; - - SplitUrlToHostAndPath("https://yandex.ru/yandsearch", host, path); - UNIT_ASSERT_STRINGS_EQUAL(host, "https://yandex.ru"); - UNIT_ASSERT_STRINGS_EQUAL(path, "/yandsearch"); - - SplitUrlToHostAndPath("yandex.ru/yandsearch", host, path); - UNIT_ASSERT_STRINGS_EQUAL(host, "yandex.ru"); - UNIT_ASSERT_STRINGS_EQUAL(path, "/yandsearch"); - - SplitUrlToHostAndPath("https://yandex.ru", host, path); - UNIT_ASSERT_STRINGS_EQUAL(host, "https://yandex.ru"); - UNIT_ASSERT_STRINGS_EQUAL(path, ""); - - SplitUrlToHostAndPath("invalid url /", host, path); - UNIT_ASSERT_STRINGS_EQUAL(host, "invalid url "); - UNIT_ASSERT_STRINGS_EQUAL(path, "/"); + TStringBuf host, path; + + SplitUrlToHostAndPath("https://yandex.ru/yandsearch", host, path); + UNIT_ASSERT_STRINGS_EQUAL(host, "https://yandex.ru"); + UNIT_ASSERT_STRINGS_EQUAL(path, "/yandsearch"); + + SplitUrlToHostAndPath("yandex.ru/yandsearch", host, path); + UNIT_ASSERT_STRINGS_EQUAL(host, "yandex.ru"); + UNIT_ASSERT_STRINGS_EQUAL(path, "/yandsearch"); + + SplitUrlToHostAndPath("https://yandex.ru", host, path); + UNIT_ASSERT_STRINGS_EQUAL(host, "https://yandex.ru"); + UNIT_ASSERT_STRINGS_EQUAL(path, ""); + + SplitUrlToHostAndPath("invalid url /", host, path); + UNIT_ASSERT_STRINGS_EQUAL(host, "invalid url "); + UNIT_ASSERT_STRINGS_EQUAL(path, "/"); SplitUrlToHostAndPath("some_blender_url", host, path); UNIT_ASSERT_STRINGS_EQUAL(host, "some_blender_url"); UNIT_ASSERT_STRINGS_EQUAL(path, ""); - } - + } + Y_UNIT_TEST(TestSeparateUrlFromQueryAndFragment) { TStringBuf sanitizedUrl, query, fragment; |