@@ -413,7 +413,7 @@ func TestTokenizer_categorize(t *testing.T) {
413
413
{name : "dot child with malformed array subscript" , path : "$.child[1:2:3:4]" },
414
414
{name : "dot child with array subscript with zero step" , path : "$.child[1:2:0]" },
415
415
{name : "dot child with non-integer array subscript" , path : "$.child[1:2:a]" },
416
- {name : "dot child with unclosed array subscript" , path : "$.child[*" },
416
+ {name : "dot child with unclosed array subscript" , path : "$.child[*" , illegal : true },
417
417
{name : "dot child with missing array subscript" , path : "$.child[]" , simple : true },
418
418
{name : "dot child with embedded space" , path : "$.child more" , simple : true },
419
419
{name : "bracket child" , path : "$['child']" , simple : true },
@@ -429,7 +429,7 @@ func TestTokenizer_categorize(t *testing.T) {
429
429
{name : "bracket child with array subscript" , path : "$['child'][*]" },
430
430
{name : "bracket child with malformed array subscript" , path : "$['child'][1:2:3:4]" },
431
431
{name : "bracket child with non-integer array subscript" , path : "$['child'][1:2:a]" },
432
- {name : "bracket child with unclosed array subscript" , path : "$['child'][*" },
432
+ {name : "bracket child with unclosed array subscript" , path : "$['child'][*" , illegal : true },
433
433
{name : "bracket child with missing array subscript" , path : "$['child'][]" , simple : true },
434
434
{name : "bracket child followed by space" , path : "$['child'] " , illegal : true },
435
435
{name : "bracket dotted child" , path : "$['child1.child2']" , simple : true },
@@ -497,7 +497,7 @@ func TestTokenizer_categorize(t *testing.T) {
497
497
{name : "simple filter with bracket with extra whitespace" , path : "$[?( ( @.child ) )]" },
498
498
{name : "simple filter with more complex subpath" , path : "$[?((@.child[0]))]" },
499
499
{name : "missing filter " , path : "$[?()]" },
500
- {name : "unclosed filter" , path : "$[?(" },
500
+ {name : "unclosed filter" , path : "$[?(" , illegal : true },
501
501
{name : "filter with missing operator" , path : "$[?(@.child @.other)]" },
502
502
{name : "filter with malformed term" , path : "$[?([)]" , illegal : true },
503
503
{name : "filter with misplaced open bracket" , path : "$[?(@.child ()]" , illegal : true },
@@ -564,13 +564,13 @@ func TestTokenizer_categorize(t *testing.T) {
564
564
{name : "filter conjunction" , path : "$[?(@.child&&@.other)]" },
565
565
{name : "filter conjunction with literals and whitespace" , path : "$[?(@.child == 'x' && -9 == @.other)]" },
566
566
{name : "filter conjunction with bracket children" , path : "$[?(@['child'][*]&&@['other'])]" },
567
- {name : "filter invalid leading conjunction" , path : "$[?(&&" },
567
+ {name : "filter invalid leading conjunction" , path : "$[?(&&" , illegal : true },
568
568
{name : "filter conjunction with extra whitespace" , path : "$[?(@.child && @.other)]" },
569
569
{name : "filter disjunction" , path : "$[?(@.child||@.other)]" },
570
- {name : "filter invalid leading disjunction" , path : "$[?(||" },
570
+ {name : "filter invalid leading disjunction" , path : "$[?(||" , illegal : true },
571
571
{name : "filter disjunction with extra whitespace" , path : "$[?(@.child || @.other)]" },
572
572
{name : "simple filter of child" , path : "$.child[?(@.child)]" },
573
- {name : "filter with missing end" , path : "$[?(@.child" },
573
+ {name : "filter with missing end" , path : "$[?(@.child" , illegal : true },
574
574
{name : "nested filter (edge case)" , path : "$[?(@.y[?(@.z)])]" },
575
575
{
name :
"filter negation" ,
path :
"$[?([email protected] )]" },
576
576
{
name :
"filter negation of comparison (edge case)" ,
path :
"$[?([email protected] >1)]" },
0 commit comments