Skip to content

Commit 7bcbf2b

Browse files
committed
Add test slice selector, negative from, negative to, positive step
1 parent a3322b0 commit 7bcbf2b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/slice_selector.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,35 @@
572572
"slice"
573573
]
574574
},
575+
{
576+
"name": "negative from, negative to, positive step",
577+
"selector": "$[-5:-2]",
578+
"document": [
579+
0,
580+
1,
581+
2,
582+
3,
583+
4,
584+
5,
585+
6,
586+
7,
587+
8,
588+
9
589+
],
590+
"result": [
591+
5,
592+
6,
593+
7
594+
],
595+
"result_paths": [
596+
"$[5]",
597+
"$[6]",
598+
"$[7]"
599+
],
600+
"tags": [
601+
"slice"
602+
]
603+
},
575604
{
576605
"name": "too many colons",
577606
"selector": "$[1:2:3:4]",

0 commit comments

Comments
 (0)