test(indent): rust - add test for indented comment

This commit is contained in:
Munif Tanjim 2022-01-21 19:57:24 +06:00 committed by Christian Clason
parent c2e3938510
commit fb7b6a266e
2 changed files with 7 additions and 0 deletions

View file

@ -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();
}

View file

@ -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 })