add tests for pd

This commit is contained in:
Aleksey Kladov 2018-12-21 18:53:00 +03:00
parent a5987bd715
commit 9de3a45be6

View File

@ -599,7 +599,18 @@ fn quux() -> i32 {
}
#[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"
// <|>
// ",
@ -615,7 +626,7 @@ mod tests {
r##"
tfn "Test function" "#[test]\nfn ${1:feature}() {\n $0\n}"
pub(crate) "pub(crate) $0"
"##,
"##,
);
}