]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libtest/lib1560: test basic websocket URL parsing
authorDaniel Stenberg <daniel@haxx.se>
Fri, 9 Sep 2022 13:11:14 +0000 (15:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 9 Sep 2022 13:11:14 +0000 (15:11 +0200)
tests/libtest/lib1560.c

index 1ec1e3cc9e8f81f4364597760671eeea1df56e10..891c4701a3f20d9c87eada0236314591a19f7dcd 100644 (file)
@@ -138,6 +138,17 @@ struct clearurlcase {
 };
 
 static const struct testcase get_parts_list[] ={
+#ifdef USE_WEBSOCKETS
+  {"ws://example.com/color/?green",
+   "ws | [11] | [12] | [13] | example.com | [15] | /color/ | green |"
+   " [17]",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_OK },
+  {"wss://example.com/color/?green",
+   "wss | [11] | [12] | [13] | example.com | [15] | /color/ | green |"
+   " [17]",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_OK },
+#endif
+
   {"https://user:password@example.net/get?this=and#but frag then", "",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_BAD_FRAGMENT},
   {"https://user:password@example.net/get?this=and what", "",