summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2014-07-06 00:11:55 -0500
committerNicolas Williams <nico@cryptonector.com>2014-07-06 01:29:43 -0500
commit7d3a44a1e23ead9dd413ae26f7a5e1de993f376a (patch)
tree6aa9f8aab8dfee579b8872b68875f187d7ae6db3 /tests
parent7fce34292e33b967ca19003dd1baf90c0bc42b22 (diff)
Add general `?` operator
Diffstat (limited to 'tests')
-rw-r--r--tests/all.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/all.test b/tests/all.test
index f5c7bd68..4bd15cee 100644
--- a/tests/all.test
+++ b/tests/all.test
@@ -670,6 +670,14 @@ def inc(x): x |= .+1; inc(.[].a)
[0,1,2,3]
["foo","Cannot index number with string \"a\"",3]
+[.[]|(.a, .a)?]
+[null,true,{"a":1}]
+[null,null,1,1]
+
+[[.[]|[.a,.a]]?]
+[null,true,{"a":1}]
+[]
+
# string operations
[.[]|startswith("foo")]
["fo", "foo", "barfoo", "foobar", "barfoob"]