Skip to content

Commit 2d9f616

Browse files
committed
Add more tailing comma tests
1 parent 8f83203 commit 2d9f616

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

parser/parser_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,18 @@ world`},
862862
},
863863
},
864864
},
865+
{
866+
`list | all(#,)`,
867+
&BuiltinNode{
868+
Name: "all",
869+
Arguments: []Node{
870+
&IdentifierNode{Value: "list"},
871+
&PredicateNode{
872+
Node: &PointerNode{},
873+
},
874+
},
875+
},
876+
},
865877
{
866878
`func(
867879
parameter1,
@@ -974,6 +986,12 @@ func TestParse_error(t *testing.T) {
974986
| 1 + if true { 2 } else { 3 }
975987
| ....^`,
976988
},
989+
{
990+
`list | all(#,,)`,
991+
`unexpected token Operator(",") (1:14)
992+
| list | all(#,,)
993+
| .............^`,
994+
},
977995
}
978996

979997
for _, test := range tests {

0 commit comments

Comments
 (0)