Skip to content

Commit f0134a0

Browse files
committed
Sync latest compliance tests from jmespath.test
1 parent 1f1579b commit f0134a0

16 files changed

+17
-59
lines changed

test/compliance/basic.json

100755100644
File mode changed.

test/compliance/boolean.json

100755100644
File mode changed.

test/compliance/current.json

100755100644
File mode changed.

test/compliance/escape.json

100755100644
File mode changed.

test/compliance/filters.json

100755100644
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@
275275
"expression": "reservations[].instances[?bar==`1`]",
276276
"result": [[{"foo": 2, "bar": 1}]]
277277
},
278+
{
279+
"expression": "reservations[*].instances[?bar==`1`]",
280+
"result": [[{"foo": 2, "bar": 1}]]
281+
},
278282
{
279283
"expression": "reservations[].instances[?bar==`1`][]",
280284
"result": [{"foo": 2, "bar": 1}]
@@ -414,6 +418,14 @@
414418
]
415419
},
416420
"cases": [
421+
{
422+
"comment": "Unary filter expression",
423+
"expression": "foo[?key]",
424+
"result": [
425+
{"key": true}, {"key": [0]}, {"key": {"a": "b"}},
426+
{"key": 0}, {"key": 1}
427+
]
428+
},
417429
{
418430
"comment": "Unary not filter expression",
419431
"expression": "foo[?!key]",

test/compliance/functions.json

100755100644
File mode changed.

test/compliance/identifiers.json

100755100644
File mode changed.

test/compliance/indices.json

100755100644
File mode changed.

test/compliance/literal.json

100755100644
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@
179179
"comment": "Do not interpret escaped unicode.",
180180
"expression": "'\\u03a6'",
181181
"result": "\\u03a6"
182+
},
183+
{
184+
"comment": "Can escape the single quote",
185+
"expression": "'foo\\'bar'",
186+
"result": "foo'bar"
182187
}
183188
]
184189
}

test/compliance/multiselect.json

100755100644
File mode changed.

0 commit comments

Comments
 (0)