cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft7/optional/format/idn-hostname.json (about) 1 [ 2 { 3 "description": "validation of internationalized host names", 4 "schema": { 5 "format": "idn-hostname" 6 }, 7 "tests": [ 8 { 9 "description": "all string formats ignore integers", 10 "data": 12, 11 "valid": true 12 }, 13 { 14 "description": "all string formats ignore floats", 15 "data": 13.7, 16 "valid": true 17 }, 18 { 19 "description": "all string formats ignore objects", 20 "data": {}, 21 "valid": true 22 }, 23 { 24 "description": "all string formats ignore arrays", 25 "data": [], 26 "valid": true 27 }, 28 { 29 "description": "all string formats ignore booleans", 30 "data": false, 31 "valid": true 32 }, 33 { 34 "description": "all string formats ignore nulls", 35 "data": null, 36 "valid": true 37 }, 38 { 39 "description": "a valid host name (example.test in Hangul)", 40 "data": "실례.테스트", 41 "valid": true 42 }, 43 { 44 "description": "illegal first char U+302E Hangul single dot tone mark", 45 "data": "〮실례.테스트", 46 "valid": false, 47 "skip": { 48 "v2": "unexpected success", 49 "v3": "unexpected success" 50 } 51 }, 52 { 53 "description": "contains illegal char U+302E Hangul single dot tone mark", 54 "data": "실〮례.테스트", 55 "valid": false, 56 "skip": { 57 "v2": "unexpected success", 58 "v3": "unexpected success" 59 } 60 }, 61 { 62 "description": "a host name with a component too long", 63 "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", 64 "valid": false, 65 "skip": { 66 "v2": "unexpected success", 67 "v3": "unexpected success" 68 } 69 }, 70 { 71 "description": "invalid label, correct Punycode", 72 "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", 73 "data": "-\u003e $1.00 \u003c--", 74 "valid": false, 75 "skip": { 76 "v2": "unexpected success", 77 "v3": "unexpected success" 78 } 79 }, 80 { 81 "description": "valid Chinese Punycode", 82 "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", 83 "data": "xn--ihqwcrb4cv8a8dqg056pqjye", 84 "valid": true 85 }, 86 { 87 "description": "invalid Punycode", 88 "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", 89 "data": "xn--X", 90 "valid": false, 91 "skip": { 92 "v2": "unexpected success", 93 "v3": "unexpected success" 94 } 95 }, 96 { 97 "description": "U-label contains \"--\" in the 3rd and 4th position", 98 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", 99 "data": "XN--aa---o47jg78q", 100 "valid": false, 101 "skip": { 102 "v2": "unexpected success", 103 "v3": "unexpected success" 104 } 105 }, 106 { 107 "description": "U-label starts with a dash", 108 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 109 "data": "-hello", 110 "valid": false, 111 "skip": { 112 "v2": "unexpected success", 113 "v3": "unexpected success" 114 } 115 }, 116 { 117 "description": "U-label ends with a dash", 118 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 119 "data": "hello-", 120 "valid": false, 121 "skip": { 122 "v2": "unexpected success", 123 "v3": "unexpected success" 124 } 125 }, 126 { 127 "description": "U-label starts and ends with a dash", 128 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 129 "data": "-hello-", 130 "valid": false, 131 "skip": { 132 "v2": "unexpected success", 133 "v3": "unexpected success" 134 } 135 }, 136 { 137 "description": "Begins with a Spacing Combining Mark", 138 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 139 "data": "ःhello", 140 "valid": false, 141 "skip": { 142 "v2": "unexpected success", 143 "v3": "unexpected success" 144 } 145 }, 146 { 147 "description": "Begins with a Nonspacing Mark", 148 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 149 "data": "̀hello", 150 "valid": false, 151 "skip": { 152 "v2": "unexpected success", 153 "v3": "unexpected success" 154 } 155 }, 156 { 157 "description": "Begins with an Enclosing Mark", 158 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 159 "data": "҈hello", 160 "valid": false, 161 "skip": { 162 "v2": "unexpected success", 163 "v3": "unexpected success" 164 } 165 }, 166 { 167 "description": "Exceptions that are PVALID, left-to-right chars", 168 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 169 "data": "ßς་〇", 170 "valid": true 171 }, 172 { 173 "description": "Exceptions that are PVALID, right-to-left chars", 174 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 175 "data": "۽۾", 176 "valid": true 177 }, 178 { 179 "description": "Exceptions that are DISALLOWED, right-to-left chars", 180 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 181 "data": "ـߺ", 182 "valid": false, 183 "skip": { 184 "v2": "unexpected success", 185 "v3": "unexpected success" 186 } 187 }, 188 { 189 "description": "Exceptions that are DISALLOWED, left-to-right chars", 190 "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", 191 "data": "〱〲〳〴〵〮〯〻", 192 "valid": false, 193 "skip": { 194 "v2": "unexpected success", 195 "v3": "unexpected success" 196 } 197 }, 198 { 199 "description": "MIDDLE DOT with no preceding 'l'", 200 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 201 "data": "a·l", 202 "valid": false, 203 "skip": { 204 "v2": "unexpected success", 205 "v3": "unexpected success" 206 } 207 }, 208 { 209 "description": "MIDDLE DOT with nothing preceding", 210 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 211 "data": "·l", 212 "valid": false, 213 "skip": { 214 "v2": "unexpected success", 215 "v3": "unexpected success" 216 } 217 }, 218 { 219 "description": "MIDDLE DOT with no following 'l'", 220 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 221 "data": "l·a", 222 "valid": false, 223 "skip": { 224 "v2": "unexpected success", 225 "v3": "unexpected success" 226 } 227 }, 228 { 229 "description": "MIDDLE DOT with nothing following", 230 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 231 "data": "l·", 232 "valid": false, 233 "skip": { 234 "v2": "unexpected success", 235 "v3": "unexpected success" 236 } 237 }, 238 { 239 "description": "MIDDLE DOT with surrounding 'l's", 240 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 241 "data": "l·l", 242 "valid": true 243 }, 244 { 245 "description": "Greek KERAIA not followed by Greek", 246 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 247 "data": "α͵S", 248 "valid": false, 249 "skip": { 250 "v2": "unexpected success", 251 "v3": "unexpected success" 252 } 253 }, 254 { 255 "description": "Greek KERAIA not followed by anything", 256 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 257 "data": "α͵", 258 "valid": false, 259 "skip": { 260 "v2": "unexpected success", 261 "v3": "unexpected success" 262 } 263 }, 264 { 265 "description": "Greek KERAIA followed by Greek", 266 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 267 "data": "α͵β", 268 "valid": true 269 }, 270 { 271 "description": "Hebrew GERESH not preceded by Hebrew", 272 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 273 "data": "A׳ב", 274 "valid": false, 275 "skip": { 276 "v2": "unexpected success", 277 "v3": "unexpected success" 278 } 279 }, 280 { 281 "description": "Hebrew GERESH not preceded by anything", 282 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 283 "data": "׳ב", 284 "valid": false, 285 "skip": { 286 "v2": "unexpected success", 287 "v3": "unexpected success" 288 } 289 }, 290 { 291 "description": "Hebrew GERESH preceded by Hebrew", 292 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 293 "data": "א׳ב", 294 "valid": true 295 }, 296 { 297 "description": "Hebrew GERSHAYIM not preceded by Hebrew", 298 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 299 "data": "A״ב", 300 "valid": false, 301 "skip": { 302 "v2": "unexpected success", 303 "v3": "unexpected success" 304 } 305 }, 306 { 307 "description": "Hebrew GERSHAYIM not preceded by anything", 308 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 309 "data": "״ב", 310 "valid": false, 311 "skip": { 312 "v2": "unexpected success", 313 "v3": "unexpected success" 314 } 315 }, 316 { 317 "description": "Hebrew GERSHAYIM preceded by Hebrew", 318 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 319 "data": "א״ב", 320 "valid": true 321 }, 322 { 323 "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", 324 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 325 "data": "def・abc", 326 "valid": false, 327 "skip": { 328 "v2": "unexpected success", 329 "v3": "unexpected success" 330 } 331 }, 332 { 333 "description": "KATAKANA MIDDLE DOT with no other characters", 334 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 335 "data": "・", 336 "valid": false, 337 "skip": { 338 "v2": "unexpected success", 339 "v3": "unexpected success" 340 } 341 }, 342 { 343 "description": "KATAKANA MIDDLE DOT with Hiragana", 344 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 345 "data": "・ぁ", 346 "valid": true 347 }, 348 { 349 "description": "KATAKANA MIDDLE DOT with Katakana", 350 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 351 "data": "・ァ", 352 "valid": true 353 }, 354 { 355 "description": "KATAKANA MIDDLE DOT with Han", 356 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 357 "data": "・丈", 358 "valid": true 359 }, 360 { 361 "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", 362 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", 363 "data": "ب٠۰", 364 "valid": false, 365 "skip": { 366 "v2": "unexpected success", 367 "v3": "unexpected success" 368 } 369 }, 370 { 371 "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", 372 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", 373 "data": "ب٠ب", 374 "valid": true 375 }, 376 { 377 "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", 378 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", 379 "data": "۰0", 380 "valid": true 381 }, 382 { 383 "description": "ZERO WIDTH JOINER not preceded by Virama", 384 "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", 385 "data": "कष", 386 "valid": false, 387 "skip": { 388 "v2": "unexpected success", 389 "v3": "unexpected success" 390 } 391 }, 392 { 393 "description": "ZERO WIDTH JOINER not preceded by anything", 394 "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", 395 "data": "ष", 396 "valid": false, 397 "skip": { 398 "v2": "unexpected success", 399 "v3": "unexpected success" 400 } 401 }, 402 { 403 "description": "ZERO WIDTH JOINER preceded by Virama", 404 "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", 405 "data": "क्ष", 406 "valid": true 407 }, 408 { 409 "description": "ZERO WIDTH NON-JOINER preceded by Virama", 410 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", 411 "data": "क्ष", 412 "valid": true 413 }, 414 { 415 "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", 416 "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", 417 "data": "بيبي", 418 "valid": true 419 }, 420 { 421 "description": "single label", 422 "data": "hostname", 423 "valid": true 424 }, 425 { 426 "description": "single label with hyphen", 427 "data": "host-name", 428 "valid": true 429 }, 430 { 431 "description": "single label with digits", 432 "data": "h0stn4me", 433 "valid": true 434 }, 435 { 436 "description": "single label ending with digit", 437 "data": "hostnam3", 438 "valid": true 439 } 440 ] 441 } 442 ]