mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 00:54:51 +08:00
Generic ast (#1829)
Remove dependency on yaml.Node for internal AST representation. Yaml decoder is now just another decoder.
This commit is contained in:
@@ -29,8 +29,8 @@ var mapOperatorScenarios = []expressionScenario{
|
||||
document2: `{x: 10, y: 20, z: 30}`,
|
||||
expression: `map_values(. + 1)`,
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::{a: 2, b: 3, c: 4}\n",
|
||||
"D0, P[], (doc)::{x: 11, y: 21, z: 31}\n",
|
||||
"D0, P[], (!!map)::{a: 2, b: 3, c: 4}\n",
|
||||
"D0, P[], (!!map)::{x: 11, y: 21, z: 31}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -38,7 +38,7 @@ var mapOperatorScenarios = []expressionScenario{
|
||||
document: `{a: 1, b: 2, c: 3}`,
|
||||
expression: `map_values(. + 1)`,
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::{a: 2, b: 3, c: 4}\n",
|
||||
"D0, P[], (!!map)::{a: 2, b: 3, c: 4}\n",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user