fix(dart): add @indent_end to } (#4167)

* fix dart indentation after }

* add some simple test case
This commit is contained in:
SzeLamC 2023-02-25 05:06:31 +08:00 committed by GitHub
parent 5c511dd124
commit 68ab44277c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,4 @@
void main() {
}
class Test {
}

View file

@ -0,0 +1,20 @@
local Runner = require("tests.indent.common").Runner
local run = Runner:new(it, "tests/indent/dart", {
tabstop = 4,
shiftwidth = 2,
softtabstop = 0,
expandtab = true,
})
describe("indent Lua:", function()
describe("whole file:", function()
run:whole_file(".", {
expected_failures = {},
})
end)
end)
describe("new line:", function()
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
end)