summaryrefslogtreecommitdiffstats
path: root/tests/jq.test
diff options
context:
space:
mode:
authorMattias Wadman <mattias.wadman@gmail.com>2023-07-04 00:51:29 +0200
committerGitHub <noreply@github.com>2023-07-04 07:51:29 +0900
commit12ce4e3b544e15828d119a84bc61e1689d9d4b44 (patch)
treec8d622f57f30a3f48b1e9624e0e6161f253b4103 /tests/jq.test
parent4dc2a2fb9df94ec45d107b798173c7db9c695a7f (diff)
Support optional else-branch for if-then-elif-end (#2598)
Diffstat (limited to 'tests/jq.test')
-rw-r--r--tests/jq.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test
index 78c4017b..e62949b7 100644
--- a/tests/jq.test
+++ b/tests/jq.test
@@ -1116,6 +1116,13 @@ null
7
[7]
+[if false then 3 elif false then 4 end]
+7
+[7]
+
+[if false then 3 elif false then 4 else . end]
+7
+[7]
[.[] | [.foo[] // .bar]]
[{"foo":[1,2], "bar": 42}, {"foo":[1], "bar": null}, {"foo":[null,false,3], "bar": 18}, {"foo":[], "bar":42}, {"foo": [null,false,null], "bar": 41}]