mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 11:59:58 -05:00
Initial community commit
This commit is contained in:
20
Src/external_dependencies/cpr/test/encoded_auth_tests.cpp
Normal file
20
Src/external_dependencies/cpr/test/encoded_auth_tests.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <cpr/cpr.h>
|
||||
|
||||
using namespace cpr;
|
||||
|
||||
TEST(EncodedAuthenticationTests, UnicodeEncoderTest) {
|
||||
std::string user = "一二三";
|
||||
std::string pass = "Hello World!";
|
||||
EncodedAuthentication pa{user, pass};
|
||||
std::string expected = "%E4%B8%80%E4%BA%8C%E4%B8%89:Hello%20World%21";
|
||||
EXPECT_EQ(pa.GetAuthString(), expected);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
Reference in New Issue
Block a user