diff --git a/hclwrite/format_test.go b/hclwrite/format_test.go index 38b1089..f31a224 100644 --- a/hclwrite/format_test.go +++ b/hclwrite/format_test.go @@ -304,6 +304,102 @@ zebra = "striped" # baz 𝒜 = 1 # foo bungle = "🇬🇧" # baz zebra = "striped" # baz +`, + }, + { + ` +foo { +# ... +} +`, + ` +foo { + # ... +} +`, + }, + { + ` +foo = { +# ... +} +`, + ` +foo = { + # ... +} +`, + }, + { + ` +foo = [ +# ... +] +`, + ` +foo = [ + # ... +] +`, + }, + { + ` +foo = [{ +# ... +}] +`, + ` +foo = [{ + # ... +}] +`, + }, + { + ` +foo { +bar { +# ... +} +} +`, + ` +foo { + bar { + # ... + } +} +`, + }, + { + ` +foo { +bar = { +# ... +} +} +`, + ` +foo { + bar = { + # ... + } +} +`, + }, + { + ` +foo { +bar = [ +# ... +] +} +`, + ` +foo { + bar = [ + # ... + ] +} `, }, }