mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
Refactored decoder responsibilities (#1402)
- improved comment handling - yaml decoder now responsible for leading content work around
This commit is contained in:
@@ -7,8 +7,16 @@ import (
|
||||
var loadScenarios = []expressionScenario{
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "Load empty file",
|
||||
description: "Load empty file with a comment",
|
||||
expression: `load("../../examples/empty.yaml")`,
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::# comment\n\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
description: "Load empty file with no comment",
|
||||
expression: `load("../../examples/empty-no-comment.yaml")`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!null)::\n",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user