mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 08:35:42 +00:00
Compare commits
2 Commits
1d68b3a01a
...
f04d37a4f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f04d37a4f7 | ||
|
|
5df71072f5 |
3
go.mod
3
go.mod
@ -30,5 +30,6 @@ require (
|
|||||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
go 1.21
|
go 1.21.0
|
||||||
|
|
||||||
toolchain go1.22.5
|
toolchain go1.22.5
|
||||||
|
|||||||
@ -11,6 +11,11 @@ func getExpressionParser() ExpressionParserInterface {
|
|||||||
return ExpressionParser
|
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) {
|
func TestParserNoMatchingCloseBracket(t *testing.T) {
|
||||||
_, err := getExpressionParser().ParseExpression(".cat | with(.;.bob")
|
_, err := getExpressionParser().ParseExpression(".cat | with(.;.bob")
|
||||||
test.AssertResultComplex(t, "bad expression - probably missing close bracket on WITH", err.Error())
|
test.AssertResultComplex(t, "bad expression - probably missing close bracket on WITH", err.Error())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user