summaryrefslogtreecommitdiff
path: root/tests/test_string.h
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-11-29 22:43:38 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-01-28 07:45:01 -0500
commite829b7aee48cfc988abea5a42bdbf02638a16513 (patch)
tree066731a9a3a000b97df58d33dd18841ef7f0b234 /tests/test_string.h
parenta3e3bf822761c477d3a297fe004496ffc6c7b10d (diff)
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
Diffstat (limited to 'tests/test_string.h')
-rw-r--r--tests/test_string.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_string.h b/tests/test_string.h
index 6fde11685c..cc3152203e 100644
--- a/tests/test_string.h
+++ b/tests/test_string.h
@@ -1152,20 +1152,12 @@ TEST_CASE("[String] hash") {
CHECK(a.hash64() != c.hash64());
}
-TEST_CASE("[String] http_escape/unescape") {
+TEST_CASE("[String] uri_encode/unescape") {
String s = "Godot Engine:'docs'";
String t = "Godot%20Engine%3A%27docs%27";
- CHECK(s.http_escape() == t);
- CHECK(t.http_unescape() == s);
-}
-
-TEST_CASE("[String] percent_encode/decode") { // Note: is it redundant? Seems to be same as http_escape/unescape but in lower case.
- String s = "Godot Engine:'docs'";
- String t = "Godot%20Engine%3a%27docs%27";
-
- CHECK(s.percent_encode() == t);
- CHECK(t.percent_decode() == s);
+ CHECK(s.uri_encode() == t);
+ CHECK(t.uri_decode() == s);
}
TEST_CASE("[String] xml_escape/unescape") {