Compare commits

..

2 Commits

Author SHA1 Message Date
AdamKorcz
f04d37a4f7
Merge 26a5a3d8b8 into 5df71072f5 2024-09-29 15:06:42 +10:00
Mike Farah
5df71072f5 Fixed index out of range error 2024-09-29 15:06:34 +10:00
2 changed files with 7 additions and 1 deletions

3
go.mod
View File

@ -30,5 +30,6 @@ require (
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
)
go 1.21
go 1.21.0
toolchain go1.22.5

View File

@ -11,6 +11,11 @@ func getExpressionParser() ExpressionParserInterface {
return ExpressionParser
}
func TestParserCreateMapColonOnItsOwn(t *testing.T) {
_, err := getExpressionParser().ParseExpression(":")
test.AssertResultComplex(t, "':' expects 2 args but there is 0", err.Error())
}
func TestParserNoMatchingCloseBracket(t *testing.T) {
_, err := getExpressionParser().ParseExpression(".cat | with(.;.bob")
test.AssertResultComplex(t, "bad expression - probably missing close bracket on WITH", err.Error())