mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 20:10:10 -04:00
test(indent): rust - add test for indented comment
This commit is contained in:
parent
c2e3938510
commit
fb7b6a266e
2 changed files with 7 additions and 0 deletions
|
|
@ -5,3 +5,9 @@
|
|||
fn foo(x: i32, y: i32) -> i32 {
|
||||
x + y
|
||||
}
|
||||
|
||||
impl A {
|
||||
/// Do some stuff!! (put cursor here and press enter)
|
||||
fn a();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ describe("indent Rust:", function()
|
|||
run:new_line("array.rs", { on_line = 2, text = "0,", indent = 4 })
|
||||
run:new_line("array.rs", { on_line = 8, text = "0,", indent = 8 })
|
||||
run:new_line("comment.rs", { on_line = 3, text = "a", indent = "/// " })
|
||||
run:new_line("comment.rs", { on_line = 10, text = "a", indent = " /// " })
|
||||
run:new_line("cond.rs", { on_line = 11, text = "x += 1;", indent = 12 })
|
||||
run:new_line("cond.rs", { on_line = 2, text = "x += 1;", indent = 8 })
|
||||
run:new_line("cond.rs", { on_line = 4, text = "x += 1;", indent = 8 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue