mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-12 19:25:37 +00:00
empty map with comment
This commit is contained in:
parent
1cf9ecc79d
commit
554eb998f6
@ -19,6 +19,12 @@ var yamlFormatScenarios = []formatScenario{
|
||||
input: "~",
|
||||
expected: "~\n",
|
||||
},
|
||||
{
|
||||
description: "comment",
|
||||
skipDoc: true,
|
||||
input: "# cat",
|
||||
expected: "# cat\n",
|
||||
},
|
||||
{
|
||||
description: "octal",
|
||||
skipDoc: true,
|
||||
@ -100,7 +106,7 @@ var yamlParseScenarios = []expressionScenario{
|
||||
}
|
||||
|
||||
func testYamlScenario(t *testing.T, s formatScenario) {
|
||||
test.AssertResultWithContext(t, s.expected, mustProcessFormatScenario(s, NewYamlDecoder(NewDefaultYamlPreferences()), NewYamlEncoder(2, false, ConfiguredYamlPreferences)), s.description)
|
||||
test.AssertResultWithContext(t, s.expected, mustProcessFormatScenario(s, NewYamlDecoder(ConfiguredYamlPreferences), NewYamlEncoder(2, false, ConfiguredYamlPreferences)), s.description)
|
||||
}
|
||||
|
||||
func TestYamlParseScenarios(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user