summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile/formatter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig/caddyfile/formatter_test.go')
-rw-r--r--caddyconfig/caddyfile/formatter_test.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/caddyconfig/caddyfile/formatter_test.go b/caddyconfig/caddyfile/formatter_test.go
index 6cae20d..64cf6d2 100644
--- a/caddyconfig/caddyfile/formatter_test.go
+++ b/caddyconfig/caddyfile/formatter_test.go
@@ -321,6 +321,44 @@ baz`,
foo
}`,
},
+ {
+ description: "matthewpi/vscode-caddyfile-support#13",
+ input: `{
+ email {$ACMEEMAIL}
+ #debug
+}
+
+block {
+}
+`,
+ expect: `{
+ email {$ACMEEMAIL}
+ #debug
+}
+
+block {
+}
+`,
+ },
+ {
+ description: "matthewpi/vscode-caddyfile-support#13 - bad formatting",
+ input: `{
+ email {$ACMEEMAIL}
+ #debug
+ }
+
+ block {
+ }
+`,
+ expect: `{
+ email {$ACMEEMAIL}
+ #debug
+}
+
+block {
+}
+`,
+ },
} {
// the formatter should output a trailing newline,
// even if the tests aren't written to expect that