@@ -413,7 +413,7 @@ func TestTokenizer_categorize(t *testing.T) {
413413 {name : "dot child with malformed array subscript" , path : "$.child[1:2:3:4]" },
414414 {name : "dot child with array subscript with zero step" , path : "$.child[1:2:0]" },
415415 {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 },
417417 {name : "dot child with missing array subscript" , path : "$.child[]" , simple : true },
418418 {name : "dot child with embedded space" , path : "$.child more" , simple : true },
419419 {name : "bracket child" , path : "$['child']" , simple : true },
@@ -429,7 +429,7 @@ func TestTokenizer_categorize(t *testing.T) {
429429 {name : "bracket child with array subscript" , path : "$['child'][*]" },
430430 {name : "bracket child with malformed array subscript" , path : "$['child'][1:2:3:4]" },
431431 {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 },
433433 {name : "bracket child with missing array subscript" , path : "$['child'][]" , simple : true },
434434 {name : "bracket child followed by space" , path : "$['child'] " , illegal : true },
435435 {name : "bracket dotted child" , path : "$['child1.child2']" , simple : true },
@@ -497,7 +497,7 @@ func TestTokenizer_categorize(t *testing.T) {
497497 {name : "simple filter with bracket with extra whitespace" , path : "$[?( ( @.child ) )]" },
498498 {name : "simple filter with more complex subpath" , path : "$[?((@.child[0]))]" },
499499 {name : "missing filter " , path : "$[?()]" },
500- {name : "unclosed filter" , path : "$[?(" },
500+ {name : "unclosed filter" , path : "$[?(" , illegal : true },
501501 {name : "filter with missing operator" , path : "$[?(@.child @.other)]" },
502502 {name : "filter with malformed term" , path : "$[?([)]" , illegal : true },
503503 {name : "filter with misplaced open bracket" , path : "$[?(@.child ()]" , illegal : true },
@@ -564,13 +564,13 @@ func TestTokenizer_categorize(t *testing.T) {
564564 {name : "filter conjunction" , path : "$[?(@.child&&@.other)]" },
565565 {name : "filter conjunction with literals and whitespace" , path : "$[?(@.child == 'x' && -9 == @.other)]" },
566566 {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 },
568568 {name : "filter conjunction with extra whitespace" , path : "$[?(@.child && @.other)]" },
569569 {name : "filter disjunction" , path : "$[?(@.child||@.other)]" },
570- {name : "filter invalid leading disjunction" , path : "$[?(||" },
570+ {name : "filter invalid leading disjunction" , path : "$[?(||" , illegal : true },
571571 {name : "filter disjunction with extra whitespace" , path : "$[?(@.child || @.other)]" },
572572 {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 },
574574 {name : "nested filter (edge case)" , path : "$[?(@.y[?(@.z)])]" },
575575 {
name :
"filter negation" ,
path :
"$[?([email protected] )]" },
576576 {
name :
"filter negation of comparison (edge case)" ,
path :
"$[?([email protected] >1)]" },
0 commit comments