Skip to content

Commit d88c87c

Browse files
committed
Add test slice selector followed by slice selector (#96)
1 parent 7f1dba4 commit d88c87c

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

tests/slice_selector.json

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,55 @@
523523
"slice"
524524
]
525525
},
526+
{
527+
"name": "in serial, on nested array",
528+
"selector": "$[1:3][1:2]",
529+
"document": [
530+
[
531+
"a",
532+
"b",
533+
"c"
534+
],
535+
[
536+
"d",
537+
"e",
538+
"f"
539+
],
540+
[
541+
"g",
542+
"h",
543+
"i"
544+
]
545+
],
546+
"result": [
547+
"e",
548+
"h"
549+
],
550+
"result_paths": [
551+
"$[1][1]",
552+
"$[2][1]"
553+
],
554+
"tags": [
555+
"slice"
556+
]
557+
},
558+
{
559+
"name": "in serial, on flat array",
560+
"selector": "$[1:3][::]",
561+
"document": [
562+
0,
563+
1,
564+
2,
565+
3,
566+
4,
567+
5
568+
],
569+
"result": [],
570+
"result_paths": [],
571+
"tags": [
572+
"slice"
573+
]
574+
},
526575
{
527576
"name": "too many colons",
528577
"selector": "$[1:2:3:4]",
@@ -1196,4 +1245,4 @@
11961245
]
11971246
}
11981247
]
1199-
}
1248+
}

0 commit comments

Comments
 (0)