-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YQ-3410 improve s3 url escape, added '#', '?' symbols (#7881)
- Loading branch information
1 parent
778dd8e
commit 22c0218
Showing
10 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
UNITTEST_FOR(ydb/library/yql/providers/s3/common) | ||
|
||
SRCS( | ||
util_ut.cpp | ||
) | ||
|
||
PEERDIR( | ||
ydb/library/yql/public/udf/service/stub | ||
ydb/library/yql/sql/pg_dummy | ||
) | ||
|
||
END() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "util.h" | ||
|
||
#include <library/cpp/string_utils/quote/quote.h> | ||
#include <library/cpp/testing/unittest/registar.h> | ||
|
||
|
||
namespace NYql::NS3Util { | ||
|
||
Y_UNIT_TEST_SUITE(TestS3UrlEscape) { | ||
// Tests on force UrlEscape copied from library/cpp/string_utils/quote/quote_ut.cpp | ||
Y_UNIT_TEST(EscapeEscapedForce) { | ||
TString s; | ||
|
||
s = "hello%3dworld"; | ||
UNIT_ASSERT_VALUES_EQUAL(NS3Util::UrlEscapeRet(s), "hello%253dworld"); | ||
} | ||
|
||
Y_UNIT_TEST(EscapeUnescapeForceRet) { | ||
TString s; | ||
|
||
s = "hello%3dworld"; | ||
UNIT_ASSERT_VALUES_EQUAL(UrlUnescapeRet(NS3Util::UrlEscapeRet(s)), "hello%3dworld"); | ||
} | ||
|
||
// Test additional symbols escape | ||
Y_UNIT_TEST(EscapeAdditionalSymbols) { | ||
TString s = "hello#?world"; | ||
|
||
UNIT_ASSERT_VALUES_EQUAL(NS3Util::UrlEscapeRet(s), "hello%23%3Fworld"); | ||
} | ||
} | ||
|
||
} // namespace NYql::NS3Util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,7 @@ IF (CLANG AND NOT WITH_VALGRIND) | |
ENDIF() | ||
|
||
END() | ||
|
||
RECURSE_FOR_TESTS( | ||
ut | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters