Debian Codegraph @

jsonpath-compliance-test-suite/tests/whitespace/selectors.json

raw symbols SCIP
1 {
2 "tests": [
3 {
4 "name": "space between root and bracket",
5 "selector" : "$ ['a']",
6 "document" : {"a": "ab"},
7 "result": [ "ab" ]
8 },
9 {
10 "name": "newline between root and bracket",
11 "selector" : "$\n['a']",
12 "document" : {"a": "ab"},
13 "result": [ "ab" ]
14 },
15 {
16 "name": "tab between root and bracket",
17 "selector" : "$\t['a']",
18 "document" : {"a": "ab"},
19 "result": [ "ab" ]
20 },
21 {
22 "name": "return between root and bracket",
23 "selector" : "$\r['a']",
24 "document" : {"a": "ab"},
25 "result": [ "ab" ]
26 },
27 {
28 "name": "space between bracket and bracket",
29 "selector" : "$['a'] ['b']",
30 "document" : {"a": {"b": "ab"} },
31 "result": [ "ab" ]
32 },
33 {
34 "name": "newline between root and bracket",
35 "selector" : "$['a'] \n['b']",
36 "document" : {"a": {"b": "ab"} },
37 "result": [ "ab" ]
38 },
39 {
40 "name": "tab between root and bracket",
41 "selector" : "$['a'] \t['b']",
42 "document" : {"a": {"b": "ab"} },
43 "result": [ "ab" ]
44 },
45 {
46 "name": "return between root and bracket",
47 "selector" : "$['a'] \r['b']",
48 "document" : {"a": {"b": "ab"} },
49 "result": [ "ab" ]
50 },
51 {
52 "name": "space between root and dot",
53 "selector" : "$ .a",
54 "document" : {"a": "ab"},
55 "result": [ "ab" ]
56 },
57 {
58 "name": "newline between root and dot",
59 "selector" : "$\n.a",
60 "document" : {"a": "ab"},
61 "result": [ "ab" ]
62 },
63 {
64 "name": "tab between root and dot",
65 "selector" : "$\t.a",
66 "document" : {"a": "ab"},
67 "result": [ "ab" ]
68 },
69 {
70 "name": "return between root and dot",
71 "selector" : "$\r.a",
72 "document" : {"a": "ab"},
73 "result": [ "ab" ]
74 },
75 {
76 "name": "space between dot and name",
77 "selector" : "$. a",
78 "invalid_selector": true
79 },
80 {
81 "name": "newline between dot and name",
82 "selector" : "$.\na",
83 "invalid_selector": true
84 },
85 {
86 "name": "tab between dot and name",
87 "selector" : "$.\ta",
88 "invalid_selector": true
89 },
90 {
91 "name": "return between dot and name",
92 "selector" : "$.\ra",
93 "invalid_selector": true
94 },
95 {
96 "name": "space between recursive descent and name",
97 "selector" : "$.. a",
98 "invalid_selector": true
99 },
100 {
101 "name": "newline between recursive descent and name",
102 "selector" : "$..\na",
103 "invalid_selector": true
104 },
105 {
106 "name": "tab between recursive descent and name",
107 "selector" : "$..\ta",
108 "invalid_selector": true
109 },
110 {
111 "name": "return between recursive descent and name",
112 "selector" : "$..\ra",
113 "invalid_selector": true
114 },
115 {
116 "name": "space between bracket and selector",
117 "selector" : "$[ 'a']",
118 "document" : {"a": "ab"},
119 "result": [ "ab" ]
120 },
121 {
122 "name": "newline between bracket and selector",
123 "selector" : "$[\n'a']",
124 "document" : {"a": "ab"},
125 "result": [ "ab" ]
126 },
127 {
128 "name": "tab between bracket and selector",
129 "selector" : "$[\t'a']",
130 "document" : {"a": "ab"},
131 "result": [ "ab" ]
132 },
133 {
134 "name": "return between bracket and selector",
135 "selector" : "$[\r'a']",
136 "document" : {"a": "ab"},
137 "result": [ "ab" ]
138 },
139 {
140 "name": "space between selector and bracket",
141 "selector" : "$['a' ]",
142 "document" : {"a": "ab"},
143 "result": [ "ab" ]
144 },
145 {
146 "name": "newline between selector and bracket",
147 "selector" : "$['a'\n]",
148 "document" : {"a": "ab"},
149 "result": [ "ab" ]
150 },
151 {
152 "name": "tab between selector and bracket",
153 "selector" : "$['a'\t]",
154 "document" : {"a": "ab"},
155 "result": [ "ab" ]
156 },
157 {
158 "name": "return between selector and bracket",
159 "selector" : "$['a'\r]",
160 "document" : {"a": "ab"},
161 "result": [ "ab" ]
162 },
163 {
164 "name": "space between selector and comma",
165 "selector" : "$['a' ,'b']",
166 "document" : {"a": "ab", "b": "bc"},
167 "result": [ "ab", "bc" ]
168 },
169 {
170 "name": "newline between selector and comma",
171 "selector" : "$['a'\n,'b']",
172 "document" : {"a": "ab", "b": "bc"},
173 "result": [ "ab", "bc" ]
174 },
175 {
176 "name": "tab between selector and comma",
177 "selector" : "$['a'\t,'b']",
178 "document" : {"a": "ab", "b": "bc"},
179 "result": [ "ab", "bc" ]
180 },
181 {
182 "name": "return between selector and comma",
183 "selector" : "$['a'\r,'b']",
184 "document" : {"a": "ab", "b": "bc"},
185 "result": [ "ab", "bc" ]
186 },
187 {
188 "name": "space between comma and selector",
189 "selector" : "$['a', 'b']",
190 "document" : {"a": "ab", "b": "bc"},
191 "result": [ "ab", "bc" ]
192 },
193 {
194 "name": "newline between comma and selector",
195 "selector" : "$['a',\n'b']",
196 "document" : {"a": "ab", "b": "bc"},
197 "result": [ "ab", "bc" ]
198 },
199 {
200 "name": "tab between comma and selector",
201 "selector" : "$['a',\t'b']",
202 "document" : {"a": "ab", "b": "bc"},
203 "result": [ "ab", "bc" ]
204 },
205 {
206 "name": "return between comma and selector",
207 "selector" : "$['a',\r'b']",
208 "document" : {"a": "ab", "b": "bc"},
209 "result": [ "ab", "bc" ]
210 }
211 ]
212 }