diff options
| author | Munif Tanjim <hello@muniftanjim.dev> | 2022-01-21 19:57:24 +0600 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-01-21 16:40:36 +0100 |
| commit | fb7b6a266efa4944f0001a840f4fe1e0570280a6 (patch) | |
| tree | 07991ced880fb0835983448dd7b63c83743b0cab /tests | |
| parent | c2e3938510e8fc2cb89b991afe95ca61a79c4683 (diff) | |
test(indent): rust - add test for indented comment
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/indent/rust/comment.rs | 6 | ||||
| -rw-r--r-- | tests/indent/rust_spec.lua | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/indent/rust/comment.rs b/tests/indent/rust/comment.rs index 334793df..8f592132 100644 --- a/tests/indent/rust/comment.rs +++ b/tests/indent/rust/comment.rs @@ -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(); +} + diff --git a/tests/indent/rust_spec.lua b/tests/indent/rust_spec.lua index ad56ae2b..dda49568 100644 --- a/tests/indent/rust_spec.lua +++ b/tests/indent/rust_spec.lua @@ -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 }) |
