Skip to content

Commit 119a518

Browse files
committed
Move some tests from toascii.json to urltestdata.json
These were introduced in e9a1061. However, these are not tests of the Unicode ToASCII algorithm. They are tests of the extra step introduced in whatwg/url@cceb435 to the URL Standard. Keep toascii.json focused on testing the ToASCII algorithm, so that software which implements it can use that file.
1 parent 7234cea commit 119a518

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

url/resources/toascii.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -160,23 +160,6 @@
160160
"input": "a\u00ADb",
161161
"output": "ab"
162162
},
163-
{
164-
"input": "a%C2%ADb",
165-
"output": "ab"
166-
},
167-
{
168-
"comment": "Empty host after domain to ASCII",
169-
"input": "\u00AD",
170-
"output": null
171-
},
172-
{
173-
"input": "%C2%AD",
174-
"output": null
175-
},
176-
{
177-
"input": "xn--",
178-
"output": null
179-
},
180163
{
181164
"comment": "Interesting UseSTD3ASCIIRules=false cases",
182165
"input": "",

url/resources/urltestdata.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8892,5 +8892,33 @@
88928892
"protocol": "https:",
88938893
"search": "",
88948894
"username": ""
8895+
},
8896+
{
8897+
"input": "https://a%C2%ADb/",
8898+
"base": "about:blank",
8899+
"hash": "",
8900+
"host": "ab",
8901+
"hostname": "ab",
8902+
"href": "https://ab/",
8903+
"origin": "https://ab",
8904+
"password": "",
8905+
"pathname": "/",
8906+
"port": "",
8907+
"protocol": "https:",
8908+
"search": "",
8909+
"username": ""
8910+
},
8911+
{
8912+
"comment": "Empty host after domain to ASCII",
8913+
"input": "https://\u00AD/",
8914+
"failure": true
8915+
},
8916+
{
8917+
"input": "https://%C2%AD/",
8918+
"failure": true
8919+
},
8920+
{
8921+
"input": "https://xn--/",
8922+
"failure": true
88958923
}
88968924
]

0 commit comments

Comments
 (0)