diff --git a/pkg/yqlib/toml_test.go b/pkg/yqlib/toml_test.go index 37117078..18be6043 100644 --- a/pkg/yqlib/toml_test.go +++ b/pkg/yqlib/toml_test.go @@ -295,6 +295,10 @@ var rtSpecialKeyTableSection = `["/tmp/blah"] value = "hello" ` +var rtSpecialKeyDottedTableSection = `[servers."http://localhost:8080"] +ip = "127.0.0.1" +` + var tomlScenarios = []formatScenario{ { skipDoc: true, @@ -638,6 +642,14 @@ var tomlScenarios = []formatScenario{ expected: rtSpecialKeyTableSection, scenarioType: "roundtrip", }, + { + skipDoc: true, + description: "Roundtrip: special character key in dotted table section header", + input: rtSpecialKeyDottedTableSection, + expression: ".", + expected: rtSpecialKeyDottedTableSection, + scenarioType: "roundtrip", + }, } func testTomlScenario(t *testing.T, s formatScenario) {