mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-06 04:45:39 +00:00
empty map with comment
This commit is contained in:
parent
1cf9ecc79d
commit
554eb998f6
@ -19,6 +19,12 @@ var yamlFormatScenarios = []formatScenario{
|
|||||||
input: "~",
|
input: "~",
|
||||||
expected: "~\n",
|
expected: "~\n",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: "comment",
|
||||||
|
skipDoc: true,
|
||||||
|
input: "# cat",
|
||||||
|
expected: "# cat\n",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
description: "octal",
|
description: "octal",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
@ -100,7 +106,7 @@ var yamlParseScenarios = []expressionScenario{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testYamlScenario(t *testing.T, s formatScenario) {
|
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) {
|
func TestYamlParseScenarios(t *testing.T) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user