Skip to content

Commit cc81a77

Browse files
committed
apply new urlpattern tests
1 parent aac12b2 commit cc81a77

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/wpt/urlpatterntestdata.json

+27
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@
11461146
},
11471147
{
11481148
"pattern": [{ "protocol": "http", "port": "100000" }],
1149+
"inputs": [{ "protocol": "http", "port": "100000" }],
11491150
"expected_obj": "error"
11501151
},
11511152
{
@@ -2400,6 +2401,11 @@
24002401
"pattern": [{ "hostname": "bad]hostname" }],
24012402
"expected_obj": "error"
24022403
},
2404+
{
2405+
"pattern": [{ "hostname": "bad\\\\hostname" }],
2406+
"inputs": [{ "hostname": "badhostname" }],
2407+
"expected_match": null
2408+
},
24032409
{
24042410
"pattern": [{ "hostname": "bad^hostname" }],
24052411
"expected_obj": "error"
@@ -2408,6 +2414,27 @@
24082414
"pattern": [{ "hostname": "bad|hostname" }],
24092415
"expected_obj": "error"
24102416
},
2417+
{
2418+
"pattern": [{ "hostname": "bad\nhostname" }],
2419+
"inputs": [{ "hostname": "badhostname" }],
2420+
"expected_match": {
2421+
"hostname": { "input": "badhostname", "groups": {} }
2422+
}
2423+
},
2424+
{
2425+
"pattern": [{ "hostname": "bad\rhostname" }],
2426+
"inputs": [{ "hostname": "badhostname" }],
2427+
"expected_match": {
2428+
"hostname": { "input": "badhostname", "groups": {} }
2429+
}
2430+
},
2431+
{
2432+
"pattern": [{ "hostname": "bad\thostname" }],
2433+
"inputs": [{ "hostname": "badhostname" }],
2434+
"expected_match": {
2435+
"hostname": { "input": "badhostname", "groups": {} }
2436+
}
2437+
},
24112438
{
24122439
"pattern": [{}],
24132440
"inputs": ["https://example.com/"],

0 commit comments

Comments
 (0)