mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
add tests module snippet
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
05399250d4
commit
4e54b1ca46
1 changed files with 18 additions and 0 deletions
|
@ -33,6 +33,24 @@ pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionConte
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
snippet(
|
||||||
|
ctx,
|
||||||
|
cap,
|
||||||
|
"Test module",
|
||||||
|
"\
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn ${1:test_name}() {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
}",
|
||||||
|
)
|
||||||
|
.lookup_by("tmod")
|
||||||
|
.add_to(acc);
|
||||||
|
|
||||||
snippet(
|
snippet(
|
||||||
ctx,
|
ctx,
|
||||||
cap,
|
cap,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue