mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
test(dart): Add an expected failure test
This commit is contained in:
parent
ce3ea7aebe
commit
978fb2b7be
2 changed files with 16 additions and 0 deletions
13
tests/indent/dart/multiple_arguments.dart
Normal file
13
tests/indent/dart/multiple_arguments.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
// Example method that causes an issue with indentation on usage
|
||||||
|
void someMethod(
|
||||||
|
void onSuccess(),
|
||||||
|
void onError(Exception ex, StackTrace stackTrace),
|
||||||
|
) {
|
||||||
|
try {} catch (_, __) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
someMethod(() {
|
||||||
|
}, (Exception ex, StackTrace stackTrace) {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
local Runner = require("tests.indent.common").Runner
|
local Runner = require("tests.indent.common").Runner
|
||||||
|
local XFAIL = require("tests.indent.common").XFAIL
|
||||||
|
|
||||||
local run = Runner:new(it, "tests/indent/dart", {
|
local run = Runner:new(it, "tests/indent/dart", {
|
||||||
tabstop = 4,
|
tabstop = 4,
|
||||||
|
|
@ -18,4 +19,6 @@ end)
|
||||||
describe("new line:", function()
|
describe("new line:", function()
|
||||||
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
|
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
|
||||||
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
|
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
|
||||||
|
run:new_line("multiple_arguments.dart", { on_line = 10, text = "var x;", indent = 4 })
|
||||||
|
run:new_line("multiple_arguments.dart", { on_line = 11, text = "var x;", indent = 4, "expected failure issue #4637", XFAIL })
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue