summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMuh Muhten <muh.muhten@gmail.com>2019-02-21 04:11:41 -0500
committerMuh Muhten <muh.muhten@gmail.com>2019-02-21 04:11:41 -0500
commit130152a2ac042ca5633c9311822768ed0dfaefe4 (patch)
tree3a16c1c9405c0c8e86cb170fca28b9bbc5282df4 /tests
parent730c73094054f2ab6217bd4cb23c0e29bc4ce8ab (diff)
Ensure limit(0; ...) is empty
Diffstat (limited to 'tests')
-rw-r--r--tests/jq.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test
index c027f538..f330fb0f 100644
--- a/tests/jq.test
+++ b/tests/jq.test
@@ -304,6 +304,14 @@ null
[11,22,33,44,55,66,77,88,99]
[11,22,33]
+[limit(0; error)]
+"badness"
+[]
+
+[limit(1; 1, error)]
+"badness"
+[1]
+
[first(range(.)), last(range(.)), nth(0; range(.)), nth(5; range(.)), try nth(-1; range(.)) catch .]
10
[0,9,0,5,"nth doesn't support negative indices"]