diff options
author | Muh Muhten <muh.muhten@gmail.com> | 2019-02-23 19:47:51 -0500 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2019-02-26 11:05:25 -0600 |
commit | d3abe3a46839d0a588c0d67d86e9db3c6facbae9 (patch) | |
tree | 1070b21e9c1fabdf25f476ca19278d0d4c93a926 | |
parent | 41b859325b5f5239ed432b6ac9a2f9a728bb093b (diff) |
Add more tests for any and all
-rw-r--r-- | tests/jq.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test index f330fb0f..539ee7d8 100644 --- a/tests/jq.test +++ b/tests/jq.test @@ -851,6 +851,51 @@ false [1,2,3,4,true] true +# Check short-circuiting +any(true, error; .) +"badness" +true + +all(false, error; .) +"badness" +false + +any(not) +[] +false + +all(not) +[] +true + +any(not) +[false] +true + +all(not) +[false] +true + +[any,all] +[] +[false,true] + +[any,all] +[true] +[true,true] + +[any,all] +[false] +[false,false] + +[any,all] +[true,false] +[true,false] + +[any,all] +[null,null,true] +[true,false] + # # Paths # |