mirror of
https://github.com/mikefarah/yq.git
synced 2026-03-10 15:54:26 +00:00
Add tests for accessing !!str <<
This commit is contained in:
parent
ae87394f4a
commit
3431aebb2c
@ -438,6 +438,15 @@ var anchorOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!map)::{a: 1, a: 2}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "!!str << should not be treated as merge anchor",
|
||||
document: `{!!str <<: {a: 37}}`,
|
||||
expression: `explode(.).a`,
|
||||
expected: []string{
|
||||
"D0, P[a], (!!null)::null\n",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestAnchorAliasOperatorScenarios(t *testing.T) {
|
||||
|
||||
@ -631,6 +631,15 @@ var traversePathOperatorScenarios = []expressionScenario{
|
||||
"D0, P[<<], (!!int)::37\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "!!str << should not be treated as merge anchor",
|
||||
document: `{!!str <<: {a: 37}}`,
|
||||
expression: `.a`,
|
||||
expected: []string{
|
||||
"D0, P[a], (!!null)::null\n",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestTraversePathOperatorScenarios(t *testing.T) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user