|
128 | 128 | "valid": false |
129 | 129 | } |
130 | 130 | ] |
| 131 | + }, |
| 132 | + { |
| 133 | + "description": "validation of A-label (punycode) host names", |
| 134 | + "schema": { |
| 135 | + "$schema": "https://json-schema.org/draft/2019-09/schema", |
| 136 | + "format": "hostname" |
| 137 | + }, |
| 138 | + "tests": [ |
| 139 | + { |
| 140 | + "description": "invalid Punycode", |
| 141 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", |
| 142 | + "data": "xn--X", |
| 143 | + "valid": false |
| 144 | + }, |
| 145 | + { |
| 146 | + "description": "a valid host name (example.test in Hangul)", |
| 147 | + "data": "xn--9n2bp8q.xn--9t4b11yi5a", |
| 148 | + "valid": true |
| 149 | + }, |
| 150 | + { |
| 151 | + "description": "contains illegal char U+302E Hangul single dot tone mark", |
| 152 | + "data": "xn--07jt112bpxg.xn--9t4b11yi5a", |
| 153 | + "valid": false |
| 154 | + }, |
| 155 | + { |
| 156 | + "description": "Begins with a Spacing Combining Mark", |
| 157 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 158 | + "data": "xn--hello-txk", |
| 159 | + "valid": false |
| 160 | + }, |
| 161 | + { |
| 162 | + "description": "Begins with a Nonspacing Mark", |
| 163 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 164 | + "data": "xn--hello-zed", |
| 165 | + "valid": false |
| 166 | + }, |
| 167 | + { |
| 168 | + "description": "Begins with an Enclosing Mark", |
| 169 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 170 | + "data": "xn--hello-6bf", |
| 171 | + "valid": false |
| 172 | + }, |
| 173 | + { |
| 174 | + "description": "Exceptions that are PVALID, left-to-right chars", |
| 175 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 176 | + "data": "xn--zca29lwxobi7a", |
| 177 | + "valid": true |
| 178 | + }, |
| 179 | + { |
| 180 | + "description": "Exceptions that are PVALID, right-to-left chars", |
| 181 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 182 | + "data": "xn--qmbc", |
| 183 | + "valid": true |
| 184 | + }, |
| 185 | + { |
| 186 | + "description": "Exceptions that are DISALLOWED, right-to-left chars", |
| 187 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 188 | + "data": "xn--chb89f", |
| 189 | + "valid": false |
| 190 | + }, |
| 191 | + { |
| 192 | + "description": "Exceptions that are DISALLOWED, left-to-right chars", |
| 193 | + "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", |
| 194 | + "data": "xn--07jceefgh4c", |
| 195 | + "valid": false |
| 196 | + }, |
| 197 | + { |
| 198 | + "description": "MIDDLE DOT with no preceding 'l'", |
| 199 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 200 | + "data": "xn--al-0ea", |
| 201 | + "valid": false |
| 202 | + }, |
| 203 | + { |
| 204 | + "description": "MIDDLE DOT with nothing preceding", |
| 205 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 206 | + "data": "xn--l-fda", |
| 207 | + "valid": false |
| 208 | + }, |
| 209 | + { |
| 210 | + "description": "MIDDLE DOT with no following 'l'", |
| 211 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 212 | + "data": "xn--la-0ea", |
| 213 | + "valid": false |
| 214 | + }, |
| 215 | + { |
| 216 | + "description": "MIDDLE DOT with nothing following", |
| 217 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 218 | + "data": "xn--l-gda", |
| 219 | + "valid": false |
| 220 | + }, |
| 221 | + { |
| 222 | + "description": "MIDDLE DOT with surrounding 'l's", |
| 223 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 224 | + "data": "xn--ll-0ea", |
| 225 | + "valid": true |
| 226 | + }, |
| 227 | + { |
| 228 | + "description": "Greek KERAIA not followed by Greek", |
| 229 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 230 | + "data": "xn--S-jib3p", |
| 231 | + "valid": false |
| 232 | + }, |
| 233 | + { |
| 234 | + "description": "Greek KERAIA not followed by anything", |
| 235 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 236 | + "data": "xn--wva3j", |
| 237 | + "valid": false |
| 238 | + }, |
| 239 | + { |
| 240 | + "description": "Greek KERAIA followed by Greek", |
| 241 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 242 | + "data": "xn--wva3je", |
| 243 | + "valid": true |
| 244 | + }, |
| 245 | + { |
| 246 | + "description": "Hebrew GERESH not preceded by Hebrew", |
| 247 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 248 | + "data": "xn--A-2hc5h", |
| 249 | + "valid": false |
| 250 | + }, |
| 251 | + { |
| 252 | + "description": "Hebrew GERESH not preceded by anything", |
| 253 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 254 | + "data": "xn--5db1e", |
| 255 | + "valid": false |
| 256 | + }, |
| 257 | + { |
| 258 | + "description": "Hebrew GERESH preceded by Hebrew", |
| 259 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 260 | + "data": "xn--4dbc5h", |
| 261 | + "valid": true |
| 262 | + }, |
| 263 | + { |
| 264 | + "description": "Hebrew GERSHAYIM not preceded by Hebrew", |
| 265 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 266 | + "data": "xn--A-2hc8h", |
| 267 | + "valid": false |
| 268 | + }, |
| 269 | + { |
| 270 | + "description": "Hebrew GERSHAYIM not preceded by anything", |
| 271 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 272 | + "data": "xn--5db3e", |
| 273 | + "valid": false |
| 274 | + }, |
| 275 | + { |
| 276 | + "description": "Hebrew GERSHAYIM preceded by Hebrew", |
| 277 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 278 | + "data": "xn--4dbc8h", |
| 279 | + "valid": true |
| 280 | + }, |
| 281 | + { |
| 282 | + "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", |
| 283 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 284 | + "data": "xn--defabc-k64e", |
| 285 | + "valid": false |
| 286 | + }, |
| 287 | + { |
| 288 | + "description": "KATAKANA MIDDLE DOT with no other characters", |
| 289 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 290 | + "data": "xn--vek", |
| 291 | + "valid": false |
| 292 | + }, |
| 293 | + { |
| 294 | + "description": "KATAKANA MIDDLE DOT with Hiragana", |
| 295 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 296 | + "data": "xn--k8j5u", |
| 297 | + "valid": true |
| 298 | + }, |
| 299 | + { |
| 300 | + "description": "KATAKANA MIDDLE DOT with Katakana", |
| 301 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 302 | + "data": "xn--bck0j", |
| 303 | + "valid": true |
| 304 | + }, |
| 305 | + { |
| 306 | + "description": "KATAKANA MIDDLE DOT with Han", |
| 307 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 308 | + "data": "xn--vek778f", |
| 309 | + "valid": true |
| 310 | + }, |
| 311 | + { |
| 312 | + "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", |
| 313 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", |
| 314 | + "data": "xn--ngb6iyr", |
| 315 | + "valid": false |
| 316 | + }, |
| 317 | + { |
| 318 | + "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", |
| 319 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", |
| 320 | + "data": "xn--ngba1o", |
| 321 | + "valid": true |
| 322 | + }, |
| 323 | + { |
| 324 | + "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", |
| 325 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", |
| 326 | + "data": "xn--0-gyc", |
| 327 | + "valid": true |
| 328 | + }, |
| 329 | + { |
| 330 | + "description": "ZERO WIDTH JOINER not preceded by Virama", |
| 331 | + "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", |
| 332 | + "data": "xn--11b2er09f", |
| 333 | + "valid": false |
| 334 | + }, |
| 335 | + { |
| 336 | + "description": "ZERO WIDTH JOINER not preceded by anything", |
| 337 | + "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", |
| 338 | + "data": "xn--02b508i", |
| 339 | + "valid": false |
| 340 | + }, |
| 341 | + { |
| 342 | + "description": "ZERO WIDTH JOINER preceded by Virama", |
| 343 | + "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", |
| 344 | + "data": "xn--11b2ezcw70k", |
| 345 | + "valid": true |
| 346 | + }, |
| 347 | + { |
| 348 | + "description": "ZERO WIDTH NON-JOINER preceded by Virama", |
| 349 | + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", |
| 350 | + "data": "xn--11b2ezcs70k", |
| 351 | + "valid": true |
| 352 | + }, |
| 353 | + { |
| 354 | + "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", |
| 355 | + "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", |
| 356 | + "data": "xn--ngba5hb2804a", |
| 357 | + "valid": true |
| 358 | + } |
| 359 | + ] |
131 | 360 | } |
132 | 361 | ] |
0 commit comments