feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent c13e28f894
commit 2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions

View file

@ -1,28 +1,31 @@
local Runner = require("tests.indent.common").Runner
local Runner = require('tests.indent.common').Runner
local run = Runner:new(it, "tests/indent/php", {
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(".", {
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 })
describe('new line:', function()
run:new_line(
"example2.php",
{ on_line = 5, text = "indentation with `enter` in insert mode is not correct", indent = 4 }
'example.php',
{ on_line = 11, text = '// new line starts 1 indentation to far', indent = 4 }
)
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 })
run:new_line("issue-3591.php", { on_line = 4, text = "$a =", indent = 8 })
run:new_line("enum-indent.php", { on_line = 4, text = "case", indent = 4 })
run:new_line(
'example2.php',
{ on_line = 5, text = 'indentation with `enter` in insert mode is not correct', indent = 4 }
)
run:new_line('issue-2497.php', { on_line = 5, text = '$a =', indent = 4 })
run:new_line('unfinished-call.php', { on_line = 6, text = '$a =', indent = 0 })
run:new_line('issue-3591.php', { on_line = 4, text = '$a =', indent = 8 })
run:new_line('enum-indent.php', { on_line = 4, text = 'case', indent = 4 })
end)
end)