]> granicus.if.org Git - jq/commitdiff
Test string slicing
authorNicolas Williams <nico@cryptonector.com>
Fri, 29 Nov 2013 18:50:21 +0000 (12:50 -0600)
committerNicolas Williams <nico@cryptonector.com>
Thu, 5 Dec 2013 00:21:39 +0000 (18:21 -0600)
tests/all.test

index 72115818e032f1d1f0e239ea5e7bc6403f8e2e95..dbf51dfb379463859c639d3e626f010c84de10d6 100644 (file)
@@ -178,6 +178,10 @@ null
 [0,1,2,3,4,5,6]
 [[], [2,3], [0,1,2,3,4], [5,6], [], []]
 
+[.[3:2], .[-5:4], .[:-2], .[-2:], .[3:3][1:], .[10:]]
+"abcdefghi"
+["","","abcdefg","hi","",""]
+
 del(.[2:4],.[0],.[-2:])
 [0,1,2,3,4,5,6,7]
 [1,4,5]