wip - comments

This commit is contained in:
Mike Farah
2025-12-08 20:30:47 +11:00
parent 4f72c37de7
commit 48707369a0
3 changed files with 220 additions and 1 deletions
+12
View File
@@ -238,6 +238,18 @@ var hclFormatScenarios = []formatScenario{
expected: "name = \"app\"\nversion = 1\nenabled = true\n",
scenarioType: "roundtrip",
},
{
description: "decode with comments",
input: "# Configuration\nport = 8080 # server port",
expected: "# Configuration\nport: 8080 # server port\n",
scenarioType: "decode",
},
{
description: "roundtrip with comments",
input: "# Configuration\nport = 8080",
expected: "# Configuration\nport = 8080\n",
scenarioType: "roundtrip",
},
}
func testHclScenario(t *testing.T, s formatScenario) {