|
1239 | 1239 | "pathname": { "input": "/bar", "groups": {}} |
1240 | 1240 | } |
1241 | 1241 | }, |
| 1242 | + { |
| 1243 | + "pattern": [{ "pathname": "./foo/bar", "baseURL": "https://example.com" }], |
| 1244 | + "inputs": [{ "pathname": "foo/bar", "baseURL": "https://example.com" }], |
| 1245 | + "exactly_empty_components": [ "port" ], |
| 1246 | + "expected_obj": { |
| 1247 | + "pathname": "/foo/bar" |
| 1248 | + }, |
| 1249 | + "expected_match": { |
| 1250 | + "protocol": { "input": "https", "groups": {}}, |
| 1251 | + "hostname": { "input": "example.com", "groups": {}}, |
| 1252 | + "pathname": { "input": "/foo/bar", "groups": {}} |
| 1253 | + } |
| 1254 | + }, |
| 1255 | + { |
| 1256 | + "pattern": [{ "pathname": "", "baseURL": "https://example.com" }], |
| 1257 | + "inputs": [{ "pathname": "/", "baseURL": "https://example.com" }], |
| 1258 | + "exactly_empty_components": [ "port" ], |
| 1259 | + "expected_obj": { |
| 1260 | + "pathname": "/" |
| 1261 | + }, |
| 1262 | + "expected_match": { |
| 1263 | + "protocol": { "input": "https", "groups": {}}, |
| 1264 | + "hostname": { "input": "example.com", "groups": {}}, |
| 1265 | + "pathname": { "input": "/", "groups": {}} |
| 1266 | + } |
| 1267 | + }, |
1242 | 1268 | { |
1243 | 1269 | "pattern": [{ "pathname": "{/bar}", "baseURL": "https://example.com/foo/" }], |
1244 | 1270 | "inputs": [{ "pathname": "./bar", "baseURL": "https://example.com/foo/" }], |
|
1257 | 1283 | }, |
1258 | 1284 | "expected_match": null |
1259 | 1285 | }, |
| 1286 | + { |
| 1287 | + "pattern": [{ "pathname": "b", "baseURL": "https://example.com/foo/" }], |
| 1288 | + "inputs": [{ "pathname": "./b", "baseURL": "https://example.com/foo/" }], |
| 1289 | + "exactly_empty_components": [ "port" ], |
| 1290 | + "expected_obj": { |
| 1291 | + "pathname": "/foo/b" |
| 1292 | + }, |
| 1293 | + "expected_match": { |
| 1294 | + "protocol": { "input": "https", "groups": {}}, |
| 1295 | + "hostname": { "input": "example.com", "groups": {}}, |
| 1296 | + "pathname": { "input": "/foo/b", "groups": {}} |
| 1297 | + } |
| 1298 | + }, |
1260 | 1299 | { |
1261 | 1300 | "pattern": [{ "pathname": "foo/bar" }], |
1262 | 1301 | "inputs": [ "https://example.com/foo/bar" ], |
1263 | 1302 | "expected_match": null |
1264 | 1303 | }, |
| 1304 | + { |
| 1305 | + "pattern": [{ "pathname": "foo/bar", "baseURL": "https://example.com" }], |
| 1306 | + "inputs": [ "https://example.com/foo/bar" ], |
| 1307 | + "exactly_empty_components": [ "port" ], |
| 1308 | + "expected_obj": { |
| 1309 | + "pathname": "/foo/bar" |
| 1310 | + }, |
| 1311 | + "expected_match": { |
| 1312 | + "protocol": { "input": "https", "groups": {}}, |
| 1313 | + "hostname": { "input": "example.com", "groups": {}}, |
| 1314 | + "pathname": { "input": "/foo/bar", "groups": {}} |
| 1315 | + } |
| 1316 | + }, |
| 1317 | + { |
| 1318 | + "pattern": [{ "pathname": ":name.html", "baseURL": "https://example.com" }], |
| 1319 | + "inputs": [ "https://example.com/foo.html"] , |
| 1320 | + "exactly_empty_components": [ "port" ], |
| 1321 | + "expected_obj": { |
| 1322 | + "pathname": "/:name.html" |
| 1323 | + }, |
| 1324 | + "expected_match": { |
| 1325 | + "protocol": { "input": "https", "groups": {}}, |
| 1326 | + "hostname": { "input": "example.com", "groups": {}}, |
| 1327 | + "pathname": { "input": "/foo.html", "groups": { "name": "foo" }} |
| 1328 | + } |
| 1329 | + }, |
1265 | 1330 | { |
1266 | 1331 | "pattern": [{ "search": "q=caf%C3%A9" }], |
1267 | 1332 | "inputs": [{ "search": "q=café" }], |
|
2072 | 2137 | }, |
2073 | 2138 | "expected_match": null |
2074 | 2139 | }, |
| 2140 | + { |
| 2141 | + "pattern": [ "data{\\:}channel.html", "https://example.com" ], |
| 2142 | + "inputs": [ "https://example.com/data:channel.html" ], |
| 2143 | + "exactly_empty_components": [ "port" ], |
| 2144 | + "expected_obj": { |
| 2145 | + "protocol": "https", |
| 2146 | + "hostname": "example.com", |
| 2147 | + "pathname": "/data\\:channel.html", |
| 2148 | + "search": "*", |
| 2149 | + "hash": "*" |
| 2150 | + }, |
| 2151 | + "expected_match": { |
| 2152 | + "protocol": { "input": "https", "groups": {} }, |
| 2153 | + "hostname": { "input": "example.com", "groups": {} }, |
| 2154 | + "pathname": { "input": "/data:channel.html", "groups": {} } |
| 2155 | + } |
| 2156 | + }, |
2075 | 2157 | { |
2076 | 2158 | "pattern": [ "http://[\\:\\:1]/" ], |
2077 | 2159 | "inputs": [ "http://[::1]/" ], |
|
0 commit comments