]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1560: add some basic IDN host name tests
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Dec 2022 09:25:13 +0000 (10:25 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Dec 2022 21:57:08 +0000 (22:57 +0100)
Closes #10094

tests/libtest/lib1560.c

index f27864c8db5f154e0ee45bd1ec48e836c8d14f46..570e5082d5f6a3da8352c5e94a5d09ff475369b1 100644 (file)
@@ -138,6 +138,25 @@ struct clearurlcase {
 };
 
 static const struct testcase get_parts_list[] ={
+  /* https://ℂᵤⓇℒ。𝐒🄴 */
+  {"https://"
+   "%e2%84%82%e1%b5%a4%e2%93%87%e2%84%92%e3%80%82%f0%9d%90%92%f0%9f%84%b4",
+   "https | [11] | [12] | [13] | ℂᵤⓇℒ。𝐒🄴 | [15] |"
+   " / | [16] | [17]",
+   0, 0, CURLUE_OK},
+  {"https://"
+   "%e2%84%82%e1%b5%a4%e2%93%87%e2%84%92%e3%80%82%f0%9d%90%92%f0%9f%84%b4",
+   "https | [11] | [12] | [13] | "
+   "%e2%84%82%e1%b5%a4%e2%93%87%e2%84%92%e3%80%82%f0%9d%90%92%f0%9f%84%b4 "
+   "| [15] | / | [16] | [17]",
+   0, CURLU_URLENCODE, CURLUE_OK},
+  {"https://"
+   "\xe2\x84\x82\xe1\xb5\xa4\xe2\x93\x87\xe2\x84\x92"
+   "\xe3\x80\x82\xf0\x9d\x90\x92\xf0\x9f\x84\xb4",
+   "https | [11] | [12] | [13] | "
+   "%e2%84%82%e1%b5%a4%e2%93%87%e2%84%92%e3%80%82%f0%9d%90%92%f0%9f%84%b4 "
+   "| [15] | / | [16] | [17]",
+   0, CURLU_URLENCODE, CURLUE_OK},
   {"https://user@example.net?he l lo",
    "https | user | [12] | [13] | example.net | [15] | / | he+l+lo | [17]",
    CURLU_ALLOW_SPACE, CURLU_URLENCODE, CURLUE_OK},