comparison OrthancFramework/UnitTestsSources/FrameworkTests.cpp @ 4234:a38376b80cd1

WebDAV: by-studies and by-patients
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Oct 2020 13:38:44 +0200
parents e99d1ad11cfe
children b96aedfa8cc1
comparison
equal deleted inserted replaced
4233:ca2a55a62c81 4234:a38376b80cd1
1084 // Unreserved characters must not be modified 1084 // Unreserved characters must not be modified
1085 std::string t = "aAzZ09.-~_"; 1085 std::string t = "aAzZ09.-~_";
1086 Toolbox::UriEncode(s, t); 1086 Toolbox::UriEncode(s, t);
1087 ASSERT_EQ(t, s); 1087 ASSERT_EQ(t, s);
1088 1088
1089 Toolbox::UriEncode(s, "!#$&'()*+,/:;=?@[]"); ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D", s); 1089 Toolbox::UriEncode(s, "!#$&'()*+,/:;=?@[]"); ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C/%3A%3B%3D%3F%40%5B%5D", s);
1090 Toolbox::UriEncode(s, "%"); ASSERT_EQ("%25", s); 1090 Toolbox::UriEncode(s, "%"); ASSERT_EQ("%25", s);
1091 1091
1092 // Encode characters from UTF-8. This is the test string from the 1092 // Encode characters from UTF-8. This is the test string from the
1093 // file "../Resources/EncodingTests.py" 1093 // file "../Resources/EncodingTests.py"
1094 Toolbox::UriEncode(s, "\x54\x65\x73\x74\xc3\xa9\xc3\xa4\xc3\xb6\xc3\xb2\xd0\x94\xce\x98\xc4\x9d\xd7\x93\xd8\xb5\xc4\xb7\xd1\x9b\xe0\xb9\x9b\xef\xbe\x88\xc4\xb0"); 1094 Toolbox::UriEncode(s, "\x54\x65\x73\x74\xc3\xa9\xc3\xa4\xc3\xb6\xc3\xb2\xd0\x94\xce\x98\xc4\x9d\xd7\x93\xd8\xb5\xc4\xb7\xd1\x9b\xe0\xb9\x9b\xef\xbe\x88\xc4\xb0");