Debian Codegraph @

encoding/jsonschema/testdata/external/tests/draft2020-12/optional/format/idn-hostname.json

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