mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Fixes append map bug when key matches value in existing map #1200
This commit is contained in:
@@ -14,6 +14,14 @@ var addOperatorScenarios = []expressionScenario{
|
||||
"D0, P[1 a], (!!int)::3\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
document: `a: key`,
|
||||
expression: `. += {"key": "b"}`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!map)::a: key\nkey: b\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
document: `[[c], [b]]`,
|
||||
|
||||
Reference in New Issue
Block a user