Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
youennf authored Jan 17, 2025
1 parent 6622504 commit ef6d83d
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions urlpattern/resources/urlpatterntestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,63 @@
"hostname": { "input": "xn--caf-dma.com", "groups": {}}
}
},
{
"pattern": ["http://\uD83D\uDEB2.com/"],
"inputs": ["http://\uD83D\uDEB2.com/"],
"exactly_empty_components": [ "port" ],
"expected_obj": {
"protocol": "http",
"hostname": "xn--h78h.com",
"pathname": "/"
},
"expected_match": {
"protocol": { "input": "http", "groups": {}},
"hostname": { "input": "xn--h78h.com", "groups": {}},
"pathname": { "input": "/", "groups": {}}
}
},
{
"pattern": ["http://\uD83D \uDEB2"],
"expected_obj": "error"
},
{
"pattern": [{"hostname":"\uD83D \uDEB2"}],
"expected_obj": "error"
},
{
"pattern": [{"pathname":"\uD83D \uDEB2"}],
"inputs": [],
"expected_obj": {
"pathname": "%EF%BF%BD%20%EF%BF%BD"
},
"expected_match": null
},
{
"pattern": [{"pathname":":\uD83D \uDEB2"}],
"expected_obj": "error"
},
{
"pattern": [{"pathname":":a\uDB40\uDD00b"}],
"inputs": [],
"expected_obj": {
"pathname": ":a\uDB40\uDD00b"
},
"expected_match": null
},
{
"pattern": [{"pathname":"test/:a\uD801\uDC50b"}],
"inputs": [{"pathname":"test/foo"}],
"expected_obj": {
"pathname": "test/:a\uD801\uDC50b"
},
"expected_match": {
"pathname": { "input": "test/foo", "groups": { "a\uD801\uDC50b": "foo" }}
}
},
{
"pattern": [{"pathname":":\uD83D\uDEB2"}],
"expected_obj": "error"
},
{
"pattern": [{ "port": "" }],
"inputs": [{ "protocol": "http", "port": "80" }],
Expand Down

0 comments on commit ef6d83d

Please sign in to comment.