← Commit list

f2fda908f9

Daniel Stenberg
Daniel Stenberg
2026-07-16
SUCCESS Duration: 193s

Subject

lib1560: test CURLU_DEFAULT_PORT more

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/data/test1560+1 -1
@@ -36,7 +36,7 @@ lib%TESTNUMBER
success
</stdout>
<limits>
-Allocations: 3450
+Allocations: 3550
</limits>
</verify>
</testcase>
tests/libtest/lib1560.c+61 -0
@@ -554,9 +554,70 @@ static const struct testcase get_parts_list[] = {
{"file:///hello.html",
"file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
0, 0, CURLUE_OK},
+
+ /* verify that we get the right default ports */
{"https://127.0.0.1",
"https | [11] | [12] | [13] | 127.0.0.1 | 443 | / | [16] | [17]",
0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"http://127.0.0.1",
+ "http | [11] | [12] | [13] | 127.0.0.1 | 80 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"ftp://127.0.0.1",
+ "ftp | [11] | [12] | [13] | 127.0.0.1 | 21 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"ftps://127.0.0.1",
+ "ftps | [11] | [12] | [13] | 127.0.0.1 | 990 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"scp://127.0.0.1",
+ "scp | [11] | [12] | [13] | 127.0.0.1 | 22 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"sftp://127.0.0.1",
+ "sftp | [11] | [12] | [13] | 127.0.0.1 | 22 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"imap://127.0.0.1",
+ "imap | [11] | [12] | [13] | 127.0.0.1 | 143 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"imaps://127.0.0.1",
+ "imaps | [11] | [12] | [13] | 127.0.0.1 | 993 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"smtp://127.0.0.1",
+ "smtp | [11] | [12] | [13] | 127.0.0.1 | 25 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"smtps://127.0.0.1",
+ "smtps | [11] | [12] | [13] | 127.0.0.1 | 465 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"pop3://127.0.0.1",
+ "pop3 | [11] | [12] | [13] | 127.0.0.1 | 110 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"pop3s://127.0.0.1",
+ "pop3s | [11] | [12] | [13] | 127.0.0.1 | 995 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+#ifndef CURL_DISABLE_WEBSOCKETS
+ {"ws://127.0.0.1",
+ "ws | [11] | [12] | [13] | 127.0.0.1 | 80 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"wss://127.0.0.1",
+ "wss | [11] | [12] | [13] | 127.0.0.1 | 443 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+#endif
+ {"telnet://127.0.0.1",
+ "telnet | [11] | [12] | [13] | 127.0.0.1 | 23 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"gopher://127.0.0.1",
+ "gopher | [11] | [12] | [13] | 127.0.0.1 | 70 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"gophers://127.0.0.1",
+ "gophers | [11] | [12] | [13] | 127.0.0.1 | 70 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+#ifndef CURL_DISABLE_LDAP
+ {"ldap://127.0.0.1",
+ "ldap | [11] | [12] | [13] | 127.0.0.1 | 389 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+ {"ldaps://127.0.0.1",
+ "ldaps | [11] | [12] | [13] | 127.0.0.1 | 636 | / | [16] | [17]",
+ 0, CURLU_DEFAULT_PORT, CURLUE_OK},
+#endif
+
{"https://127.0.0.1",
"https | [11] | [12] | [13] | 127.0.0.1 | [15] | / | [16] | [17]",
CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},