summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2017-02-17 00:40:26 -0500
committerNicolas Williams <nico@cryptonector.com>2017-03-26 05:36:22 -0500
commitc8a2a0acc23e87cb28db794ee95f7d8b87d3ccbb (patch)
treeb0ba05735a9c1e1492bd27a402e731d1f9b72fe8 /tests
parent3a8c8f4747313d324f4309af66e2211319eccffd (diff)
downloadjq-c8a2a0acc23e87cb28db794ee95f7d8b87d3ccbb.tar.gz
Fix a tripped assertion when generating reduces
A noop body, while useless, should still compile successfully
Diffstat (limited to 'tests')
-rw-r--r--tests/jq.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test
index ac784ef..2882d9c 100644
--- a/tests/jq.test
+++ b/tests/jq.test
@@ -710,6 +710,11 @@ reduce range(5) as $n ([]; select($n%2 == 1) | . + [$n])
null
[1,3]
+# This, while useless, should still compile.
+reduce . as $n (.; .)
+null
+null
+
. as $dot|any($dot[];not)
[1,2,3,4,true,false,1,2,3,4,5]
true