From 635f075f187ac73c65e6939b8402494469a4d627 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 16 Dec 2020 15:22:16 -0700 Subject: caddyfile: Fix minor bug in formatter --- caddyconfig/caddyfile/formatter_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'caddyconfig/caddyfile/formatter_test.go') diff --git a/caddyconfig/caddyfile/formatter_test.go b/caddyconfig/caddyfile/formatter_test.go index 6751eca..6cae20d 100644 --- a/caddyconfig/caddyfile/formatter_test.go +++ b/caddyconfig/caddyfile/formatter_test.go @@ -310,6 +310,17 @@ baz`, input: `redir / /some/#/path`, expect: `redir / /some/#/path`, }, + { + description: "brace does not fold into comment above", + input: `# comment +{ + foo +}`, + expect: `# comment +{ + foo +}`, + }, } { // the formatter should output a trailing newline, // even if the tests aren't written to expect that -- cgit v1.2.3