|
2253 | 2253 | "pattern": [{ "pathname": "/foo" }, "https://example.com" ],
|
2254 | 2254 | "expected_obj": "error"
|
2255 | 2255 | },
|
| 2256 | + { |
| 2257 | + "pattern": [{ "pathname": ":name*" }], |
| 2258 | + "inputs": [{ "pathname": "foobar" }], |
| 2259 | + "expected_match": { |
| 2260 | + "pathname": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2261 | + } |
| 2262 | + }, |
| 2263 | + { |
| 2264 | + "pattern": [{ "pathname": ":name+" }], |
| 2265 | + "inputs": [{ "pathname": "foobar" }], |
| 2266 | + "expected_match": { |
| 2267 | + "pathname": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2268 | + } |
| 2269 | + }, |
| 2270 | + { |
| 2271 | + "pattern": [{ "pathname": ":name" }], |
| 2272 | + "inputs": [{ "pathname": "foobar" }], |
| 2273 | + "expected_match": { |
| 2274 | + "pathname": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2275 | + } |
| 2276 | + }, |
| 2277 | + { |
| 2278 | + "pattern": [{ "protocol": ":name*" }], |
| 2279 | + "inputs": [{ "protocol": "foobar" }], |
| 2280 | + "expected_match": { |
| 2281 | + "protocol": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2282 | + } |
| 2283 | + }, |
| 2284 | + { |
| 2285 | + "pattern": [{ "protocol": ":name+" }], |
| 2286 | + "inputs": [{ "protocol": "foobar" }], |
| 2287 | + "expected_match": { |
| 2288 | + "protocol": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2289 | + } |
| 2290 | + }, |
| 2291 | + { |
| 2292 | + "pattern": [{ "protocol": ":name" }], |
| 2293 | + "inputs": [{ "protocol": "foobar" }], |
| 2294 | + "expected_match": { |
| 2295 | + "protocol": { "input": "foobar", "groups": { "name": "foobar" }} |
| 2296 | + } |
| 2297 | + }, |
2256 | 2298 | {
|
2257 | 2299 | "pattern": [{}],
|
2258 | 2300 | "inputs": ["https://example.com/"],
|
|
0 commit comments