Skip to content

Commit ad94cac

Browse files
author
Oleg
committed
Add test cases for other valid label separators in IDN hostnames
1 parent 39002ae commit ad94cac

File tree

4 files changed

+120
-0
lines changed

4 files changed

+120
-0
lines changed

tests/draft-next/optional/format/idn-hostname.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,36 @@
336336
"description": "single dot",
337337
"data": ".",
338338
"valid": false
339+
},
340+
{
341+
"description": "single ideographic full stop (RFC 3490#3.1)",
342+
"data": "\u3002",
343+
"valid": false
344+
},
345+
{
346+
"description": "single fullwidth full stop (RFC 3490#3.1)",
347+
"data": "\uff0e",
348+
"valid": false
349+
},
350+
{
351+
"description": "single halfwidth ideographic full stop (RFC 3490#3.1)",
352+
"data": "\uff61",
353+
"valid": false
354+
},
355+
{
356+
"description": "ideographic full stop (RFC 3490#3.1) as label separator",
357+
"data": "a\u3002b",
358+
"valid": true
359+
},
360+
{
361+
"description": "fullwidth full stop (RFC 3490#3.1) as label separator",
362+
"data": "a\uff0eb",
363+
"valid": true
364+
},
365+
{
366+
"description": "halfwidth ideographic full stop (RFC 3490#3.1) as label separator",
367+
"data": "a\uff61b",
368+
"valid": true
339369
}
340370
]
341371
}

tests/draft2019-09/optional/format/idn-hostname.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,36 @@
336336
"description": "single dot",
337337
"data": ".",
338338
"valid": false
339+
},
340+
{
341+
"description": "single ideographic full stop (RFC 3490#3.1)",
342+
"data": "\u3002",
343+
"valid": false
344+
},
345+
{
346+
"description": "single fullwidth full stop (RFC 3490#3.1)",
347+
"data": "\uff0e",
348+
"valid": false
349+
},
350+
{
351+
"description": "single halfwidth ideographic full stop (RFC 3490#3.1)",
352+
"data": "\uff61",
353+
"valid": false
354+
},
355+
{
356+
"description": "ideographic full stop (RFC 3490#3.1) as label separator",
357+
"data": "a\u3002b",
358+
"valid": true
359+
},
360+
{
361+
"description": "fullwidth full stop (RFC 3490#3.1) as label separator",
362+
"data": "a\uff0eb",
363+
"valid": true
364+
},
365+
{
366+
"description": "halfwidth ideographic full stop (RFC 3490#3.1) as label separator",
367+
"data": "a\uff61b",
368+
"valid": true
339369
}
340370
]
341371
}

tests/draft2020-12/optional/format/idn-hostname.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,36 @@
336336
"description": "single dot",
337337
"data": ".",
338338
"valid": false
339+
},
340+
{
341+
"description": "single ideographic full stop (RFC 3490#3.1)",
342+
"data": "\u3002",
343+
"valid": false
344+
},
345+
{
346+
"description": "single fullwidth full stop (RFC 3490#3.1)",
347+
"data": "\uff0e",
348+
"valid": false
349+
},
350+
{
351+
"description": "single halfwidth ideographic full stop (RFC 3490#3.1)",
352+
"data": "\uff61",
353+
"valid": false
354+
},
355+
{
356+
"description": "ideographic full stop (RFC 3490#3.1) as label separator",
357+
"data": "a\u3002b",
358+
"valid": true
359+
},
360+
{
361+
"description": "fullwidth full stop (RFC 3490#3.1) as label separator",
362+
"data": "a\uff0eb",
363+
"valid": true
364+
},
365+
{
366+
"description": "halfwidth ideographic full stop (RFC 3490#3.1) as label separator",
367+
"data": "a\uff61b",
368+
"valid": true
339369
}
340370
]
341371
}

tests/draft7/optional/format/idn-hostname.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,36 @@
328328
"description": "single dot",
329329
"data": ".",
330330
"valid": false
331+
},
332+
{
333+
"description": "single ideographic full stop (RFC 3490#3.1)",
334+
"data": "\u3002",
335+
"valid": false
336+
},
337+
{
338+
"description": "single fullwidth full stop (RFC 3490#3.1)",
339+
"data": "\uff0e",
340+
"valid": false
341+
},
342+
{
343+
"description": "single halfwidth ideographic full stop (RFC 3490#3.1)",
344+
"data": "\uff61",
345+
"valid": false
346+
},
347+
{
348+
"description": "ideographic full stop (RFC 3490#3.1) as label separator",
349+
"data": "a\u3002b",
350+
"valid": true
351+
},
352+
{
353+
"description": "fullwidth full stop (RFC 3490#3.1) as label separator",
354+
"data": "a\uff0eb",
355+
"valid": true
356+
},
357+
{
358+
"description": "halfwidth ideographic full stop (RFC 3490#3.1) as label separator",
359+
"data": "a\uff61b",
360+
"valid": true
331361
}
332362
]
333363
}

0 commit comments

Comments
 (0)