Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/external_dependencies/cpr/test/encoded_auth_tests.cpp
2024-09-24 14:54:57 +02:00

21 lines
492 B
C++

#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();
}