mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 23:34:48 +08:00
Fixed sort dropping head comment #1181
This commit is contained in:
@@ -79,6 +79,15 @@ var sortByOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!seq)::[{a: false, b: 1}, {a: false, b: 3}, {a: true, b: 2}]\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "head comment",
|
||||
document: "# abc\n- def\n# ghi",
|
||||
expression: `sort`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!seq)::# abc\n- def\n# ghi\n",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestSortByOperatorScenarios(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user