From c7aa0cec1ecb05bcc4de60f314f00155e1317c66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 06:51:10 +0000 Subject: [PATCH] Add test for dotted table section header with special character key Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/12c783dd-8b7f-43bf-b71a-e7a0b5e55fea Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com> --- pkg/yqlib/toml_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) {