mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 02:03:24 +08:00
Fixed append array issue https://github.com/mikefarah/yq/issues/874
This commit is contained in:
@@ -14,6 +14,14 @@ var addOperatorScenarios = []expressionScenario{
|
||||
"D0, P[1 a], (!!int)::3\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
document: "array: [1]\narray2: [2]",
|
||||
expression: ".array += .array2",
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::array: [1, 2]\narray2: [2]\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
document: `{}`,
|
||||
|
||||
Reference in New Issue
Block a user