Fixed loading yaml with header issue #1445

This commit is contained in:
Mike Farah
2022-11-25 12:05:56 +11:00
parent 91dc315fdb
commit 4478bd14c9
6 changed files with 51 additions and 8 deletions
+9
View File
@@ -13,6 +13,15 @@ var loadScenarios = []expressionScenario{
"D0, P[], (doc)::# comment\n\n",
},
},
{
skipDoc: true,
description: "Load file with a header comment into an array",
document: `- "../../examples/small.yaml"`,
expression: `.[] |= load(.)`,
expected: []string{
"D0, P[], (doc)::- # comment\n # about things\n a: cat\n",
},
},
{
skipDoc: true,
description: "Load empty file with no comment",