diff options
Diffstat (limited to 'crates/ra_analysis/src/completion')
-rw-r--r-- | crates/ra_analysis/src/completion/reference_completion.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion/reference_completion.rs b/crates/ra_analysis/src/completion/reference_completion.rs index c2a650b6d..c2ac95453 100644 --- a/crates/ra_analysis/src/completion/reference_completion.rs +++ b/crates/ra_analysis/src/completion/reference_completion.rs | |||
@@ -599,7 +599,18 @@ mod tests { | |||
599 | } | 599 | } |
600 | 600 | ||
601 | #[test] | 601 | #[test] |
602 | fn test_item_snippets() { | 602 | fn completes_snippets_in_expressions() { |
603 | check_snippet_completion( | ||
604 | r"fn foo(x: i32) { <|> }", | ||
605 | r##" | ||
606 | pd "eprintln!(\"$0 = {:?}\", $0);" | ||
607 | ppd "eprintln!(\"$0 = {:#?}\", $0);" | ||
608 | "##, | ||
609 | ); | ||
610 | } | ||
611 | |||
612 | #[test] | ||
613 | fn completes_snippets_in_items() { | ||
603 | // check_snippet_completion(r" | 614 | // check_snippet_completion(r" |
604 | // <|> | 615 | // <|> |
605 | // ", | 616 | // ", |
@@ -615,7 +626,7 @@ mod tests { | |||
615 | r##" | 626 | r##" |
616 | tfn "Test function" "#[test]\nfn ${1:feature}() {\n $0\n}" | 627 | tfn "Test function" "#[test]\nfn ${1:feature}() {\n $0\n}" |
617 | pub(crate) "pub(crate) $0" | 628 | pub(crate) "pub(crate) $0" |
618 | "##, | 629 | "##, |
619 | ); | 630 | ); |
620 | } | 631 | } |
621 | 632 | ||