mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 07:04:48 +08:00
Added another comment test
This commit is contained in:
@@ -64,6 +64,14 @@ var commentOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (doc)::# single\n\na: cat\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Set head comment of a map entry",
|
||||
document: "f: foo\na:\n b: cat",
|
||||
expression: `(.a | key) head_comment="single"`,
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::f: foo\n# single\na:\n b: cat\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Set foot comment, using an expression",
|
||||
document: `a: cat`,
|
||||
|
||||
Reference in New Issue
Block a user