[
{
"description"
:
"validation of internationalized host names"
,
"schema"
: {
"format"
:
"idn-hostname"
},
"tests"
: [
{
"description"
:
"all string formats ignore integers"
,
"data"
: 12,
"valid"
:
true
},
{
"description"
:
"all string formats ignore floats"
,
"data"
: 13.7,
"valid"
:
true
},
{
"description"
:
"all string formats ignore objects"
,
"data"
: {},
"valid"
:
true
},
{
"description"
:
"all string formats ignore arrays"
,
"data"
: [],
"valid"
:
true
},
{
"description"
:
"all string formats ignore booleans"
,
"data"
:
false
,
"valid"
:
true
},
{
"description"
:
"all string formats ignore nulls"
,
"data"
:
null
,
"valid"
:
true
},
{
"description"
:
"a valid host name (example.test in Hangul)"
,
"data"
:
"실례.테스트"
,
"valid"
:
true
},
{
"description"
:
"illegal first char U+302E Hangul single dot tone mark"
,
"data"
:
"〮실례.테스트"
,
"valid"
:
false
},
{
"description"
:
"contains illegal char U+302E Hangul single dot tone mark"
,
"data"
:
"실〮례.테스트"
,
"valid"
:
false
},
{
"description"
:
"a host name with a component too long"
,
"data"
:
"실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트"
,
"valid"
:
false
},
{
"description"
:
"invalid label, correct Punycode"
,
"data"
:
"-> $1.00 <--"
,
"valid"
:
false
},
{
"description"
:
"valid Chinese Punycode"
,
"data"
:
"xn--ihqwcrb4cv8a8dqg056pqjye"
,
"valid"
:
true
},
{
"description"
:
"invalid Punycode"
,
"data"
:
"xn--X"
,
"valid"
:
false
},
{
"description"
:
"U-label contains \"--\" in the 3rd and 4th position"
,
"data"
:
"XN--aa---o47jg78q"
,
"valid"
:
false
},
{
"description"
:
"U-label starts with a dash"
,
"data"
:
"-hello"
,
"valid"
:
false
},
{
"description"
:
"U-label ends with a dash"
,
"data"
:
"hello-"
,
"valid"
:
false
},
{
"description"
:
"U-label starts and ends with a dash"
,
"data"
:
"-hello-"
,
"valid"
:
false
},
{
"description"
:
"Begins with a Spacing Combining Mark"
,
"data"
:
"\u0903hello"
,
"valid"
:
false
},
{
"description"
:
"Begins with a Nonspacing Mark"
,
"data"
:
"\u0300hello"
,
"valid"
:
false
},
{
"description"
:
"Begins with an Enclosing Mark"
,
"data"
:
"\u0488hello"
,
"valid"
:
false
},
{
"description"
:
"Exceptions that are PVALID, left-to-right chars"
,
"data"
:
"\u00df\u03c2\u0f0b\u3007"
,
"valid"
:
true
},
{
"description"
:
"Exceptions that are PVALID, right-to-left chars"
,
"data"
:
"\u06fd\u06fe"
,
"valid"
:
true
},
{
"description"
:
"Exceptions that are DISALLOWED, right-to-left chars"
,
"data"
:
"\u0640\u07fa"
,
"valid"
:
false
},
{
"description"
:
"Exceptions that are DISALLOWED, left-to-right chars"
,
"data"
:
"\u3031\u3032\u3033\u3034\u3035\u302e\u302f\u303b"
,
"valid"
:
false
},
{
"description"
:
"MIDDLE DOT with no preceding 'l'"
,
"data"
:
"a\u00b7l"
,
"valid"
:
false
},
{
"description"
:
"MIDDLE DOT with nothing preceding"
,
"data"
:
"\u00b7l"
,
"valid"
:
false
},
{
"description"
:
"MIDDLE DOT with no following 'l'"
,
"data"
:
"l\u00b7a"
,
"valid"
:
false
},
{
"description"
:
"MIDDLE DOT with nothing following"
,
"data"
:
"l\u00b7"
,
"valid"
:
false
},
{
"description"
:
"MIDDLE DOT with surrounding 'l's"
,
"data"
:
"l\u00b7l"
,
"valid"
:
true
},
{
"description"
:
"Greek KERAIA not followed by Greek"
,
"data"
:
"\u03b1\u0375S"
,
"valid"
:
false
},
{
"description"
:
"Greek KERAIA not followed by anything"
,
"data"
:
"\u03b1\u0375"
,
"valid"
:
false
},
{
"description"
:
"Greek KERAIA followed by Greek"
,
"data"
:
"\u03b1\u0375\u03b2"
,
"valid"
:
true
},
{
"description"
:
"Hebrew GERESH not preceded by Hebrew"
,
"data"
:
"A\u05f3\u05d1"
,
"valid"
:
false
},
{
"description"
:
"Hebrew GERESH not preceded by anything"
,
"data"
:
"\u05f3\u05d1"
,
"valid"
:
false
},
{
"description"
:
"Hebrew GERESH preceded by Hebrew"
,
"data"
:
"\u05d0\u05f3\u05d1"
,
"valid"
:
true
},
{
"description"
:
"Hebrew GERSHAYIM not preceded by Hebrew"
,
"data"
:
"A\u05f4\u05d1"
,
"valid"
:
false
},
{
"description"
:
"Hebrew GERSHAYIM not preceded by anything"
,
"data"
:
"\u05f4\u05d1"
,
"valid"
:
false
},
{
"description"
:
"Hebrew GERSHAYIM preceded by Hebrew"
,
"data"
:
"\u05d0\u05f4\u05d1"
,
"valid"
:
true
},
{
"description"
:
"KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han"
,
"data"
:
"def\u30fbabc"
,
"valid"
:
false
},
{
"description"
:
"KATAKANA MIDDLE DOT with no other characters"
,
"data"
:
"\u30fb"
,
"valid"
:
false
},
{
"description"
:
"KATAKANA MIDDLE DOT with Hiragana"
,
"data"
:
"\u30fb\u3041"
,
"valid"
:
true
},
{
"description"
:
"KATAKANA MIDDLE DOT with Katakana"
,
"data"
:
"\u30fb\u30a1"
,
"valid"
:
true
},
{
"description"
:
"KATAKANA MIDDLE DOT with Han"
,
"data"
:
"\u30fb\u4e08"
,
"valid"
:
true
},
{
"description"
:
"Arabic-Indic digits mixed with Extended Arabic-Indic digits"
,
"data"
:
"\u0628\u0660\u06f0"
,
"valid"
:
false
},
{
"description"
:
"Arabic-Indic digits not mixed with Extended Arabic-Indic digits"
,
"data"
:
"\u0628\u0660\u0628"
,
"valid"
:
true
},
{
"description"
:
"Extended Arabic-Indic digits not mixed with Arabic-Indic digits"
,
"data"
:
"\u06f00"
,
"valid"
:
true
},
{
"description"
:
"ZERO WIDTH JOINER not preceded by Virama"
,
"data"
:
"\u0915\u200d\u0937"
,
"valid"
:
false
},
{
"description"
:
"ZERO WIDTH JOINER not preceded by anything"
,
"data"
:
"\u200d\u0937"
,
"valid"
:
false
},
{
"description"
:
"ZERO WIDTH JOINER preceded by Virama"
,
"data"
:
"\u0915\u094d\u200d\u0937"
,
"valid"
:
true
},
{
"description"
:
"ZERO WIDTH NON-JOINER preceded by Virama"
,
"data"
:
"\u0915\u094d\u200c\u0937"
,
"valid"
:
true
},
{
"description"
:
"ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp"
,
"data"
:
"\u0628\u064a\u200c\u0628\u064a"
,
"valid"
:
true
},
{
"description"
:
"single label"
,
"data"
:
"hostname"
,
"valid"
:
true
},
{
"description"
:
"single label with hyphen"
,
"data"
:
"host-name"
,
"valid"
:
true
},
{
"description"
:
"single label with digits"
,
"data"
:
"h0stn4me"
,
"valid"
:
true
},
{
"description"
:
"single label starting with digit"
,
"data"
:
"1host"
,
"valid"
:
true
},
{
"description"
:
"single label ending with digit"
,
"data"
:
"hostnam3"
,
"valid"
:
true
},
{
"description"
:
"empty string"
,
"data"
:
""
,
"valid"
:
false
},
{
"description"
:
"single dot"
,
"data"
:
"."
,
"valid"
:
false
}
]
}
]