Skip to content

Commit bef99a3

Browse files
committed
Test IDN label separators separate labels
This tests that the extended label separators used in `idn-hostname` properly validate individual labels and don't treat the whole instance as a single label.
1 parent d6b7fb3 commit bef99a3

File tree

4 files changed

+160
-0
lines changed

4 files changed

+160
-0
lines changed

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,46 @@
423423
"description": "trailing halfwidth ideographic full stop",
424424
"data": "example\uff61",
425425
"valid": false
426+
},
427+
{
428+
"description": "dot separator with label that is too long when separator is ignored",
429+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
430+
"valid": true
431+
},
432+
{
433+
"description": "ideographic full stop separator with label that is too long when separator is ignored",
434+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
435+
"valid": true
436+
},
437+
{
438+
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
439+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
440+
"valid": true
441+
},
442+
{
443+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
444+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
445+
"valid": true
446+
},
447+
{
448+
"description": "dot separator with label that is too long when separator is respected",
449+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
450+
"valid": false
451+
},
452+
{
453+
"description": "ideographic full stop separator with label that is too long when separator is respected",
454+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
455+
"valid": false
456+
},
457+
{
458+
"description": "fullwidth full stop separator with label that is too long when separator is respected",
459+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
460+
"valid": false
461+
},
462+
{
463+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
464+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
465+
"valid": false
426466
}
427467
]
428468
}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,46 @@
423423
"description": "trailing halfwidth ideographic full stop",
424424
"data": "example\uff61",
425425
"valid": false
426+
},
427+
{
428+
"description": "dot separator with label that is too long when separator is ignored",
429+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
430+
"valid": true
431+
},
432+
{
433+
"description": "ideographic full stop separator with label that is too long when separator is ignored",
434+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
435+
"valid": true
436+
},
437+
{
438+
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
439+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
440+
"valid": true
441+
},
442+
{
443+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
444+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
445+
"valid": true
446+
},
447+
{
448+
"description": "dot separator with label that is too long when separator is respected",
449+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
450+
"valid": false
451+
},
452+
{
453+
"description": "ideographic full stop separator with label that is too long when separator is respected",
454+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
455+
"valid": false
456+
},
457+
{
458+
"description": "fullwidth full stop separator with label that is too long when separator is respected",
459+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
460+
"valid": false
461+
},
462+
{
463+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
464+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
465+
"valid": false
426466
}
427467
]
428468
}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,46 @@
423423
"description": "trailing halfwidth ideographic full stop",
424424
"data": "example\uff61",
425425
"valid": false
426+
},
427+
{
428+
"description": "dot separator with label that is too long when separator is ignored",
429+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
430+
"valid": true
431+
},
432+
{
433+
"description": "ideographic full stop separator with label that is too long when separator is ignored",
434+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
435+
"valid": true
436+
},
437+
{
438+
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
439+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
440+
"valid": true
441+
},
442+
{
443+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
444+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
445+
"valid": true
446+
},
447+
{
448+
"description": "dot separator with label that is too long when separator is respected",
449+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
450+
"valid": false
451+
},
452+
{
453+
"description": "ideographic full stop separator with label that is too long when separator is respected",
454+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
455+
"valid": false
456+
},
457+
{
458+
"description": "fullwidth full stop separator with label that is too long when separator is respected",
459+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
460+
"valid": false
461+
},
462+
{
463+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
464+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
465+
"valid": false
426466
}
427467
]
428468
}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,46 @@
412412
"description": "trailing halfwidth ideographic full stop",
413413
"data": "example\uff61",
414414
"valid": false
415+
},
416+
{
417+
"description": "dot separator with label that is too long when separator is ignored",
418+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
419+
"valid": true
420+
},
421+
{
422+
"description": "ideographic full stop separator with label that is too long when separator is ignored",
423+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
424+
"valid": true
425+
},
426+
{
427+
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
428+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
429+
"valid": true
430+
},
431+
{
432+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
433+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
434+
"valid": true
435+
},
436+
{
437+
"description": "dot separator with label that is too long when separator is respected",
438+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
439+
"valid": false
440+
},
441+
{
442+
"description": "ideographic full stop separator with label that is too long when separator is respected",
443+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
444+
"valid": false
445+
},
446+
{
447+
"description": "fullwidth full stop separator with label that is too long when separator is respected",
448+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
449+
"valid": false
450+
},
451+
{
452+
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
453+
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
454+
"valid": false
415455
}
416456
]
417457
}

0 commit comments

Comments
 (0)