mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-24 08:22:13 +08:00
Fixed index out of range error
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user