ci: add tests for #4632

Issue #4632 might be fixed by
https://github.com/UserNobody14/tree-sitter-dart/pull/41
This commit is contained in:
Stephan Seitz 2023-04-15 13:53:26 +02:00
parent f0b50973f3
commit 39a78192fb
2 changed files with 11 additions and 0 deletions

View file

@ -3,3 +3,11 @@ void test() {
} catch(e) {
}
}
// Issue #4632
class Test {
void test(){
try {
}
}
}

View file

@ -25,6 +25,9 @@ describe("new line:", function()
run:new_line("class.dart", { on_line = 6, text = "'100'", indent = 8 }, "expected failure", XFAIL)
run:new_line("class.dart", { on_line = 7, text = "int five = 5", indent = 2 }, "expected failure", XFAIL)
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
for _, content in ipairs { "var x;", "var x" } do
run:new_line("try.dart", { on_line = 10, text = content, indent = 6 })
end
run:new_line("switch.dart", { on_line = 3, text = "x = 1;", indent = 6 })
run:new_line("switch.dart", { on_line = 9, text = "x = 1;", indent = 6 })
run:new_line("switch.dart", { on_line = 3, text = "case 2:", indent = 4 })