@@ -123,7 +123,62 @@ TEST(UrlParserTests, BasicTests)
123123 {" path" , " /path1@bbb/path2" },
124124 {" query" , " q1=a1&q2=a2" },
125125 {" success" , " true" }}},
126-
126+ {" http://1.2.3.4/path1/path2?q1=a1&q2=a2" ,
127+ {{" host" , " 1.2.3.4" },
128+ {" port" , " 80" },
129+ {" scheme" , " http" },
130+ {" path" , " /path1/path2" },
131+ {" query" , " q1=a1&q2=a2" },
132+ {" success" , " true" }}},
133+ {" user:password@1.2.3.4:8080/path1/path2?q1=a1&q2=a2" ,
134+ {{" host" , " 1.2.3.4" },
135+ {" port" , " 8080" },
136+ {" scheme" , " http" },
137+ {" path" , " /path1/path2" },
138+ {" query" , " q1=a1&q2=a2" },
139+ {" success" , " true" }}},
140+ {" https://user@1.2.3.4/path1/path2?q1=a1&q2=a2" ,
141+ {{" host" , " 1.2.3.4" },
142+ {" port" , " 443" },
143+ {" scheme" , " https" },
144+ {" path" , " /path1/path2" },
145+ {" query" , " q1=a1&q2=a2" },
146+ {" success" , " true" }}},
147+ {" http://1.2.3.4/path1@bbb/path2?q1=a1&q2=a2" ,
148+ {{" host" , " 1.2.3.4" },
149+ {" port" , " 80" },
150+ {" scheme" , " http" },
151+ {" path" , " /path1@bbb/path2" },
152+ {" query" , " q1=a1&q2=a2" },
153+ {" success" , " true" }}},
154+ {" http://[fe80::225:93da:bfde:b5f5]/path1/path2?q1=a1&q2=a2" ,
155+ {{" host" , " [fe80::225:93da:bfde:b5f5]" },
156+ {" port" , " 80" },
157+ {" scheme" , " http" },
158+ {" path" , " /path1/path2" },
159+ {" query" , " q1=a1&q2=a2" },
160+ {" success" , " true" }}},
161+ {" user:password@[fe80::225:93da:bfde:b5f5]:8080/path1/path2?q1=a1&q2=a2" ,
162+ {{" host" , " [fe80::225:93da:bfde:b5f5]" },
163+ {" port" , " 8080" },
164+ {" scheme" , " http" },
165+ {" path" , " /path1/path2" },
166+ {" query" , " q1=a1&q2=a2" },
167+ {" success" , " true" }}},
168+ {" https://user@[fe80::225:93da:bfde:b5f5]/path1/path2?q1=a1&q2=a2" ,
169+ {{" host" , " [fe80::225:93da:bfde:b5f5]" },
170+ {" port" , " 443" },
171+ {" scheme" , " https" },
172+ {" path" , " /path1/path2" },
173+ {" query" , " q1=a1&q2=a2" },
174+ {" success" , " true" }}},
175+ {" http://[fe80::225:93da:bfde:b5f5]/path1@bbb/path2?q1=a1&q2=a2" ,
176+ {{" host" , " [fe80::225:93da:bfde:b5f5]" },
177+ {" port" , " 80" },
178+ {" scheme" , " http" },
179+ {" path" , " /path1@bbb/path2" },
180+ {" query" , " q1=a1&q2=a2" },
181+ {" success" , " true" }}},
127182 };
128183 for (auto &url_map : urls_map)
129184 {
0 commit comments