mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 17:36:59 +08:00
Can now retrieve the alias names of merge anchors #1942
This commit is contained in:
@@ -35,6 +35,15 @@ steps:
|
||||
`
|
||||
|
||||
var traversePathOperatorScenarios = []expressionScenario{
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "access merge anchors",
|
||||
document: "foo: &foo {x: y}\nbar:\n <<: *foo\n",
|
||||
expression: `.bar["<<"] | alias`,
|
||||
expected: []string{
|
||||
"D0, P[bar <<], (!!str)::foo\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "dynamically set parent and key",
|
||||
|
||||
Reference in New Issue
Block a user