Debian Codegraph @

share/tests/draft7/optional/format/iri.json

raw
1 [
2 {
3 "description": "validation of IRIs",
4 "schema": { "format": "iri" },
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 IRI with anchor tag",
38 "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
39 "valid": true
40 },
41 {
42 "description": "a valid IRI with anchor tag and parentheses",
43 "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1",
44 "valid": true
45 },
46 {
47 "description": "a valid IRI with URL-encoded stuff",
48 "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff",
49 "valid": true
50 },
51 {
52 "description": "invalid percent-encoding with non-hex digits",
53 "data": "http://ƒøø.ßår/%6G",
54 "valid": false
55 },
56 {
57 "description": "incomplete percent-encoding triplet",
58 "data": "http://ƒøø.ßår/%A",
59 "valid": false
60 },
61 {
62 "description": "lone percent sign is invalid",
63 "data": "http://ƒøø.ßår/%",
64 "valid": false
65 },
66 {
67 "description": "a valid IRI with many special characters",
68 "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
69 "valid": true
70 },
71 {
72 "description": "a valid IRI based on IPv6",
73 "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]",
74 "valid": true
75 },
76 {
77 "description": "an IPv6 address without enclosing brackets is invalid",
78 "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
79 "valid": false
80 },
81 {
82 "description": "an invalid relative IRI Reference",
83 "data": "/abc",
84 "valid": false
85 },
86 {
87 "description": "an invalid IRI",
88 "data": "\\\\WINDOWS\\filëßåré",
89 "valid": false
90 },
91 {
92 "description": "an invalid IRI though valid IRI reference",
93 "data": "âππ",
94 "valid": false
95 },
96 {
97 "description": "an IPv6 host whose embedded IPv4 has a leading zero is invalid",
98 "data": "http://[::ffff:192.168.0.01]",
99 "valid": false
100 },
101 {
102 "description": "a valid IRI with a compressed IPv6 host",
103 "data": "http://[2001:db8::1]",
104 "valid": true
105 },
106 {
107 "description": "a trailing newline after a valid IRI is invalid",
108 "data": "http://ƒøø.ßår/\n",
109 "valid": false
110 },
111 {
112 "description": "an IPvFuture host with an uppercase version letter is valid",
113 "data": "http://[V1.fe]",
114 "valid": true
115 },
116 {
117 "description": "a valid IRI with an IPv4 host",
118 "data": "http://192.168.0.1/p",
119 "valid": true
120 },
121 {
122 "description": "a valid IRI with no authority and a rootless path",
123 "data": "urn:example:resource",
124 "valid": true
125 },
126 {
127 "description": "a valid IRI with no authority and an absolute path",
128 "data": "file:/etc/hosts",
129 "valid": true
130 },
131 {
132 "description": "a valid IRI with a supplementary-plane character in the path",
133 "data": "http://ƒøø.ßår/𐌀",
134 "valid": true
135 },
136 {
137 "description": "a valid IRI with a supplementary-plane private-use char in query",
138 "data": "http://ƒøø.ßår/?q=󰀀",
139 "valid": true
140 }
141 ]
142 }
143 ]