mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Add more tests for any and all
This commit is contained in:
committed by
Nico Williams
parent
41b859325b
commit
d3abe3a468
@@ -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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user