Fixed index out of range error

This commit is contained in:
Mike Farah
2024-09-29 15:06:34 +10:00
parent cc7738bb8d
commit 5df71072f5
3 changed files with 8 additions and 2 deletions
+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())