mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
Generalising the empty array fix to map
This commit is contained in:
@@ -132,6 +132,17 @@ var deleteOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!map)::testList: [] # A comment\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "Delete all entries from map with inline key comment",
|
||||
document: `testMap: # A comment
|
||||
name: test1
|
||||
value: 123`,
|
||||
expression: `del(.testMap[])`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!map)::testMap: {} # A comment\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "Delete entry appended to an array",
|
||||
|
||||
Reference in New Issue
Block a user