empty map with comment

This commit is contained in:
Mike Farah 2023-11-18 15:18:53 +11:00
parent 1cf9ecc79d
commit 554eb998f6

View File

@ -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) {