aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2023-04-15 13:53:26 +0200
committerStephan Seitz <stephan.seitz@fau.de>2023-05-05 14:57:51 +0200
commit39a78192fbcee43f0b9134d668663b0cfc1e082b (patch)
treef29b5aa1ef26bd522ff89d09f1a23a04af4c18d8 /tests
parentUpdate parsers: bash, dart, haskell, http (diff)
downloadnvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar.gz
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar.bz2
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar.lz
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar.xz
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.tar.zst
nvim-treesitter-39a78192fbcee43f0b9134d668663b0cfc1e082b.zip
ci: add tests for #4632
Issue #4632 might be fixed by https://github.com/UserNobody14/tree-sitter-dart/pull/41
Diffstat (limited to 'tests')
-rw-r--r--tests/indent/dart/try.dart8
-rw-r--r--tests/indent/dart_spec.lua3
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/indent/dart/try.dart b/tests/indent/dart/try.dart
index 807ad3b0f..8b78d7d51 100644
--- a/tests/indent/dart/try.dart
+++ b/tests/indent/dart/try.dart
@@ -3,3 +3,11 @@ void test() {
} catch(e) {
}
}
+
+// Issue #4632
+class Test {
+ void test(){
+ try {
+ }
+ }
+}
diff --git a/tests/indent/dart_spec.lua b/tests/indent/dart_spec.lua
index f3c360cbe..c1d018738 100644
--- a/tests/indent/dart_spec.lua
+++ b/tests/indent/dart_spec.lua
@@ -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 })