Skip to content

Commit a2e15ad

Browse files
edgulmoz-wptsync-bot
authored andcommitted
Fixed urlpattern bug where labels are not correctly added to match output groups
Differential Revision: https://phabricator.services.mozilla.com/D276858 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2005071 gecko-commit: 663a3ee5e134a3f95fb50d308f38d5e6a205e9fe gecko-reviewers: necko-reviewers, valentin
1 parent 29ee535 commit a2e15ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

urlpattern/resources/urlpatterntestdata.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,5 +3108,15 @@
31083108
"hostname": { "input": "www.example.com", "groups": {} },
31093109
"pathname": { "input": "/path/with/x", "groups": { "0": "path/with/x" } }
31103110
}
3111+
},
3112+
{
3113+
"pattern": [{ "hostname": ":domain(.*)" }],
3114+
"inputs": [{ "hostname": "localhost" }],
3115+
"expected_obj": {
3116+
"hostname": ":domain(.*)"
3117+
},
3118+
"expected_match": {
3119+
"hostname": { "input": "localhost", "groups": { "domain" : "localhost"} }
3120+
}
31113121
}
31123122
]

0 commit comments

Comments
 (0)