summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2015-08-16 19:44:16 -0700
committerDavid Tolnay <dtolnay@gmail.com>2015-08-16 19:44:16 -0700
commitb8f71d365927416c7f453f5d5e969a51a6073c4b (patch)
tree639a784d5bea252d8f822b96d2a0ff972922e1ff /tests
parent2d05b5475c98ab46494f193f234e97a7803ddace (diff)
Fix assert fail when delpaths is given non-array (fix #901)
Diffstat (limited to 'tests')
-rw-r--r--tests/jq.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test
index 07d81ee8..021253d8 100644
--- a/tests/jq.test
+++ b/tests/jq.test
@@ -756,6 +756,10 @@ delpaths([[-200]])
[1,2,3]
[1,2,3]
+try delpaths(0) catch .
+{}
+"Paths must be specified as an array"
+
del(.), del(empty), del((.foo,.bar,.baz) | .[2,3,0]), del(.foo[0], .bar[0], .foo, .baz.bar[0].x)
{"foo": [0,1,2,3,4], "bar": [0,1]}
null