github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json (about)

     1  [
     2      {
     3          "description": "validation of internationalized host names",
     4          "schema": { "format": "idn-hostname" },
     5          "tests": [
     6              {
     7                  "description": "all string formats ignore integers",
     8                  "data": 12,
     9                  "valid": true
    10              },
    11              {
    12                  "description": "all string formats ignore floats",
    13                  "data": 13.7,
    14                  "valid": true
    15              },
    16              {
    17                  "description": "all string formats ignore objects",
    18                  "data": {},
    19                  "valid": true
    20              },
    21              {
    22                  "description": "all string formats ignore arrays",
    23                  "data": [],
    24                  "valid": true
    25              },
    26              {
    27                  "description": "all string formats ignore booleans",
    28                  "data": false,
    29                  "valid": true
    30              },
    31              {
    32                  "description": "all string formats ignore nulls",
    33                  "data": null,
    34                  "valid": true
    35              },
    36              {
    37                  "description": "a valid host name (example.test in Hangul)",
    38                  "data": "실례.테스트",
    39                  "valid": true
    40              },
    41              {
    42                  "description": "illegal first char U+302E Hangul single dot tone mark",
    43                  "data": "〮실례.테스트",
    44                  "valid": false
    45              },
    46              {
    47                  "description": "contains illegal char U+302E Hangul single dot tone mark",
    48                  "data": "실〮례.테스트",
    49                  "valid": false
    50              },
    51              {
    52                  "description": "a host name with a component too long",
    53                  "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트",
    54                  "valid": false
    55              },
    56              {
    57                  "description": "invalid label, correct Punycode",
    58                  "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1",
    59                  "data": "-> $1.00 <--",
    60                  "valid": false
    61              },
    62              {
    63                  "description": "valid Chinese Punycode",
    64                  "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4",
    65                  "data": "xn--ihqwcrb4cv8a8dqg056pqjye",
    66                  "valid": true
    67              },
    68              {
    69                  "description": "invalid Punycode",
    70                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1",
    71                  "data": "xn--X",
    72                  "valid": false
    73              },
    74              {
    75                  "description": "U-label contains \"--\" in the 3rd and 4th position",
    76                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1",
    77                  "data": "XN--aa---o47jg78q",
    78                  "valid": false
    79              },
    80              {
    81                  "description": "U-label starts with a dash",
    82                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
    83                  "data": "-hello",
    84                  "valid": false
    85              },
    86              {
    87                  "description": "U-label ends with a dash",
    88                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
    89                  "data": "hello-",
    90                  "valid": false
    91              },
    92              {
    93                  "description": "U-label starts and ends with a dash",
    94                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
    95                  "data": "-hello-",
    96                  "valid": false
    97              },
    98              {
    99                  "description": "Begins with a Spacing Combining Mark",
   100                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
   101                  "data": "\u0903hello",
   102                  "valid": false
   103              },
   104              {
   105                  "description": "Begins with a Nonspacing Mark",
   106                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
   107                  "data": "\u0300hello",
   108                  "valid": false
   109              },
   110              {
   111                  "description": "Begins with an Enclosing Mark",
   112                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
   113                  "data": "\u0488hello",
   114                  "valid": false
   115              },
   116              {
   117                  "description": "Exceptions that are PVALID, left-to-right chars",
   118                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
   119                  "data": "\u00df\u03c2\u0f0b\u3007",
   120                  "valid": true
   121              },
   122              {
   123                  "description": "Exceptions that are PVALID, right-to-left chars",
   124                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
   125                  "data": "\u06fd\u06fe",
   126                  "valid": true
   127              },
   128              {
   129                  "description": "Exceptions that are DISALLOWED, right-to-left chars",
   130                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
   131                  "data": "\u0640\u07fa",
   132                  "valid": false
   133              },
   134              {
   135                  "description": "Exceptions that are DISALLOWED, left-to-right chars",
   136                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start",
   137                  "data": "\u3031\u3032\u3033\u3034\u3035\u302e\u302f\u303b",
   138                  "valid": false
   139              },
   140              {
   141                  "description": "MIDDLE DOT with no preceding 'l'",
   142                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
   143                  "data": "a\u00b7l",
   144                  "valid": false
   145              },
   146              {
   147                  "description": "MIDDLE DOT with nothing preceding",
   148                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
   149                  "data": "\u00b7l",
   150                  "valid": false
   151              },
   152              {
   153                  "description": "MIDDLE DOT with no following 'l'",
   154                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
   155                  "data": "l\u00b7a",
   156                  "valid": false
   157              },
   158              {
   159                  "description": "MIDDLE DOT with nothing following",
   160                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
   161                  "data": "l\u00b7",
   162                  "valid": false
   163              },
   164              {
   165                  "description": "MIDDLE DOT with surrounding 'l's",
   166                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
   167                  "data": "l\u00b7l",
   168                  "valid": true
   169              },
   170              {
   171                  "description": "Greek KERAIA not followed by Greek",
   172                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
   173                  "data": "\u03b1\u0375S",
   174                  "valid": false
   175              },
   176              {
   177                  "description": "Greek KERAIA not followed by anything",
   178                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
   179                  "data": "\u03b1\u0375",
   180                  "valid": false
   181              },
   182              {
   183                  "description": "Greek KERAIA followed by Greek",
   184                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
   185                  "data": "\u03b1\u0375\u03b2",
   186                  "valid": true
   187              },
   188              {
   189                  "description": "Hebrew GERESH not preceded by Hebrew",
   190                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
   191                  "data": "A\u05f3\u05d1",
   192                  "valid": false
   193              },
   194              {
   195                  "description": "Hebrew GERESH not preceded by anything",
   196                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
   197                  "data": "\u05f3\u05d1",
   198                  "valid": false
   199              },
   200              {
   201                  "description": "Hebrew GERESH preceded by Hebrew",
   202                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
   203                  "data": "\u05d0\u05f3\u05d1",
   204                  "valid": true
   205              },
   206              {
   207                  "description": "Hebrew GERSHAYIM not preceded by Hebrew",
   208                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
   209                  "data": "A\u05f4\u05d1",
   210                  "valid": false
   211              },
   212              {
   213                  "description": "Hebrew GERSHAYIM not preceded by anything",
   214                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
   215                  "data": "\u05f4\u05d1",
   216                  "valid": false
   217              },
   218              {
   219                  "description": "Hebrew GERSHAYIM preceded by Hebrew",
   220                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
   221                  "data": "\u05d0\u05f4\u05d1",
   222                  "valid": true
   223              },
   224              {
   225                  "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han",
   226                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
   227                  "data": "def\u30fbabc",
   228                  "valid": false
   229              },
   230              {
   231                  "description": "KATAKANA MIDDLE DOT with no other characters",
   232                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
   233                  "data": "\u30fb",
   234                  "valid": false
   235              },
   236              {
   237                  "description": "KATAKANA MIDDLE DOT with Hiragana",
   238                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
   239                  "data": "\u30fb\u3041",
   240                  "valid": true
   241              },
   242              {
   243                  "description": "KATAKANA MIDDLE DOT with Katakana",
   244                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
   245                  "data": "\u30fb\u30a1",
   246                  "valid": true
   247              },
   248              {
   249                  "description": "KATAKANA MIDDLE DOT with Han",
   250                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
   251                  "data": "\u30fb\u4e08",
   252                  "valid": true
   253              },
   254              {
   255                  "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits",
   256                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8",
   257                  "data": "\u0660\u06f0",
   258                  "valid": false
   259              },
   260              {
   261                  "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits",
   262                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8",
   263                  "data": "\u0628\u0660\u0628",
   264                  "valid": true
   265              },
   266              {
   267                  "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits",
   268                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9",
   269                  "data": "\u06f00",
   270                  "valid": true
   271              },
   272              {
   273                  "description": "ZERO WIDTH JOINER not preceded by Virama",
   274                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
   275                  "data": "\u0915\u200d\u0937",
   276                  "valid": false
   277              },
   278              {
   279                  "description": "ZERO WIDTH JOINER not preceded by anything",
   280                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
   281                  "data": "\u200d\u0937",
   282                  "valid": false
   283              },
   284              {
   285                  "description": "ZERO WIDTH JOINER preceded by Virama",
   286                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
   287                  "data": "\u0915\u094d\u200d\u0937",
   288                  "valid": true
   289              },
   290              {
   291                  "description": "ZERO WIDTH NON-JOINER preceded by Virama",
   292                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1",
   293                  "data": "\u0915\u094d\u200c\u0937",
   294                  "valid": true
   295              },
   296              {
   297                  "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp",
   298                  "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement",
   299                  "data": "\u0628\u064a\u200c\u0628\u064a",
   300                  "valid": true
   301              },
   302              {
   303                  "description": "single label",
   304                  "data": "hostname",
   305                  "valid": true
   306              },
   307              {
   308                  "description": "single label with hyphen",
   309                  "data": "host-name",
   310                  "valid": true
   311              },
   312              {
   313                  "description": "single label with digits",
   314                  "data": "h0stn4me",
   315                  "valid": true
   316              },
   317              {
   318                  "description": "single label ending with digit",
   319                  "data": "hostnam3",
   320                  "valid": true
   321              }
   322          ]
   323      }
   324  ]