From ae4c982f94b3b780041b16d6b5df247a67102d92 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Mon, 24 Jan 2022 20:39:18 +0100 Subject: indents(php): align with C indentation Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2357 --- tests/indent/php_spec.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/indent/php_spec.lua (limited to 'tests/indent/php_spec.lua') diff --git a/tests/indent/php_spec.lua b/tests/indent/php_spec.lua new file mode 100644 index 000000000..f081c3a22 --- /dev/null +++ b/tests/indent/php_spec.lua @@ -0,0 +1,20 @@ +local Runner = require("tests.indent.common").Runner + +local run = Runner:new(it, "tests/indent/php", { + tabstop = 4, + shiftwidth = 4, + softtabstop = 0, + expandtab = true, +}) + +describe("indent PHP:", function() + describe("whole file:", function() + run:whole_file(".", { + expected_failures = {}, + }) + end) + + describe("new line:", function() + run:new_line("example.php", { on_line = 11, text = "// new line starts 1 indentation to far", indent = 4 }) + end) +end) -- cgit v1.2.3-70-g09d2