Skip to content

Commit 5599357

Browse files
committed
Update regression tests following evaluation against latest release
1 parent 305e38e commit 5599357

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

test/Clojure_json-path.yaml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ queries:
1313
document: ["first", "second", "third", "forth", "fifth"]
1414
result: null
1515
status: open
16+
- id: array_index_dot_notation_on_object
17+
selector: $.2
18+
document: {"a": "first", "2": "second", "b": "third"}
19+
result: "second"
20+
status: pass
1621
- id: array_index_last
1722
selector: $[-1]
1823
document: ["first", "second", "third"]
@@ -111,8 +116,8 @@ queries:
111116
- id: filter_greater_than
112117
selector: $[?(@.key>42)]
113118
document: [{"key": 0}, {"key": 42}, {"key": -1}, {"key": 41}, {"key": 43}, {"key": 42.0001}, {"key": 41.9999}, {"key": 100}]
114-
status: error
115-
consensus: [{"key": 43}, {"key": 42.0001}, {"key": 100}]
119+
result: [{"key": 43}, {"key": 42.0001}, {"key": 100}]
120+
status: pass
116121
- id: filter_greater_than_or_equal
117122
selector: $[?(@.key>=42)]
118123
document: [{"key": 0}, {"key": 42}, {"key": -1}, {"key": 41}, {"key": 43}, {"key": 42.0001}, {"key": 41.9999}, {"key": 100}, {"some": "value"}]
@@ -180,6 +185,19 @@ queries:
180185
selector: $[key]
181186
document: {"key": "value"}
182187
status: error
188+
- id: key_dot_bracket_notation
189+
selector: $.['key']
190+
document: {"key": "value"}
191+
status: error
192+
consensus: "value"
193+
- id: key_dot_bracket_notation_with_double_quotes
194+
selector: $.["key"]
195+
document: {"key": "value"}
196+
status: error
197+
- id: key_dot_bracket_notation_without_quotes
198+
selector: $.[key]
199+
document: {"key": "value"}
200+
status: error
183201
- id: key_dot_notation
184202
selector: $.key
185203
document: {"key": "value"}
@@ -195,6 +213,16 @@ queries:
195213
document: {"key": null}
196214
result: null
197215
status: pass
216+
- id: key_dot_notation_with_double_quotes
217+
selector: $."key"
218+
document: {"key": "value"}
219+
result: null
220+
status: open
221+
- id: key_dot_notation_with_single_quotes
222+
selector: $.'key'
223+
document: {"key": "value"}
224+
result: "value"
225+
status: open
198226
- id: recursive_array_index
199227
selector: $..[0]
200228
document: ["first", {"key": ["first nested", {"more": [{"nested": ["deepest", "second"]}, ["more", "values"]]}]}]
@@ -204,6 +232,16 @@ queries:
204232
document: {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
205233
result: ["top", "value", "something", {"key": "russian dolls"}, "russian dolls"]
206234
status: pass
235+
- id: recursive_key_with_double_quotes
236+
selector: $.."key"
237+
document: {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
238+
result: []
239+
status: open
240+
- id: recursive_key_with_single_quotes
241+
selector: $..'key'
242+
document: {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
243+
result: ["top", "value", "something", {"key": "russian dolls"}, "russian dolls"]
244+
status: open
207245
- id: recursive_on_nested_object
208246
selector: $.store..price
209247
document: {"store": {"book": [{"category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95}, {"category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99}, {"category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99}, {"category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99}], "bicycle": {"color": "red", "price": 19.95}}}
@@ -252,9 +290,8 @@ queries:
252290
- id: wildcard_bracket_notation_with_key_on_nested_objects
253291
selector: $[*].bar[*].baz
254292
document: [{"bar": [{"baz": "hello"}]}]
255-
result: [null]
256-
status: fail
257-
consensus: ["hello"]
293+
result: ["hello"]
294+
status: pass
258295
- id: wildcard_dot_notation_on_array
259296
selector: $.*
260297
document: ["string", 42, {"key": "value"}, [0, 1]]

0 commit comments

Comments
 (0)