mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
add tests for pd
This commit is contained in:
parent
a5987bd715
commit
9de3a45be6
1 changed files with 13 additions and 2 deletions
|
@ -599,7 +599,18 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_item_snippets() {
|
fn completes_snippets_in_expressions() {
|
||||||
|
check_snippet_completion(
|
||||||
|
r"fn foo(x: i32) { <|> }",
|
||||||
|
r##"
|
||||||
|
pd "eprintln!(\"$0 = {:?}\", $0);"
|
||||||
|
ppd "eprintln!(\"$0 = {:#?}\", $0);"
|
||||||
|
"##,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn completes_snippets_in_items() {
|
||||||
// check_snippet_completion(r"
|
// check_snippet_completion(r"
|
||||||
// <|>
|
// <|>
|
||||||
// ",
|
// ",
|
||||||
|
@ -615,7 +626,7 @@ mod tests {
|
||||||
r##"
|
r##"
|
||||||
tfn "Test function" "#[test]\nfn ${1:feature}() {\n $0\n}"
|
tfn "Test function" "#[test]\nfn ${1:feature}() {\n $0\n}"
|
||||||
pub(crate) "pub(crate) $0"
|
pub(crate) "pub(crate) $0"
|
||||||
"##,
|
"##,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue