summaryrefslogtreecommitdiff
path: root/tests/indent
diff options
context:
space:
mode:
authorMichael Hoffmann <mhoffm@posteo.de>2022-04-24 23:16:35 +0200
committerStephan Seitz <stephan.seitz@fau.de>2022-04-25 23:36:36 +0200
commit82e43748cf70adab261ba0a23a342774bd5b9088 (patch)
treec86943a612b0ab45801f7a3845310157e1778874 /tests/indent
parentb1e8b61a94955d747ba8ad02cd3c0dddb1bf883f (diff)
indent(hcl): fix function calls
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/hcl/function_call.tf6
-rw-r--r--tests/indent/hcl_spec.lua2
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/indent/hcl/function_call.tf b/tests/indent/hcl/function_call.tf
new file mode 100644
index 00000000..44c477e4
--- /dev/null
+++ b/tests/indent/hcl/function_call.tf
@@ -0,0 +1,6 @@
+test {
+ x = f(
+ a,
+ b,
+ )
+}
diff --git a/tests/indent/hcl_spec.lua b/tests/indent/hcl_spec.lua
index b97af278..ee53d89f 100644
--- a/tests/indent/hcl_spec.lua
+++ b/tests/indent/hcl_spec.lua
@@ -29,5 +29,7 @@ describe("indent HCL:", function()
run:new_line("multiple-attributes.tf", { on_line = 4, text = "a = 1", indent = 0 })
run:new_line("nested_blocks.tf", { on_line = 3, text = "a = 1", indent = 4 })
run:new_line("nested_blocks.tf", { on_line = 4, text = "a = 1", indent = 2 })
+ run:new_line("function_call.tf", { on_line = 4, text = "c,", indent = 4 })
+ run:new_line("function_call.tf", { on_line = 5, text = "a = 1", indent = 2 })
end)
end)