diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_snippet.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_snippet.rs | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs index e0368b3b2..a35f31511 100644 --- a/crates/ra_ide_api/src/completion/complete_snippet.rs +++ b/crates/ra_ide_api/src/completion/complete_snippet.rs | |||
@@ -84,33 +84,31 @@ mod tests { | |||
84 | #[test] | 84 | #[test] |
85 | fn completes_snippets_in_items() { | 85 | fn completes_snippets_in_items() { |
86 | assert_debug_snapshot_matches!( | 86 | assert_debug_snapshot_matches!( |
87 | do_snippet_completion( | 87 | do_snippet_completion( |
88 | r" | 88 | r" |
89 | #[cfg(test)] | 89 | #[cfg(test)] |
90 | mod tests { | 90 | mod tests { |
91 | <|> | 91 | <|> |
92 | } | 92 | } |
93 | " | 93 | " |
94 | ), | 94 | ), |
95 | @r###" | 95 | @r###"[ |
96 | ⋮[ | 96 | CompletionItem { |
97 | ⋮ CompletionItem { | 97 | label: "Test function", |
98 | ⋮ label: "Test function", | 98 | source_range: [78; 78), |
99 | ⋮ source_range: [78; 78), | 99 | delete: [78; 78), |
100 | ⋮ delete: [78; 78), | 100 | insert: "#[test]\nfn ${1:feature}() {\n $0\n}", |
101 | ⋮ insert: "#[test]\nfn ${1:feature}() {\n $0\n}", | 101 | kind: Snippet, |
102 | ⋮ kind: Snippet, | 102 | lookup: "tfn", |
103 | ⋮ lookup: "tfn", | 103 | }, |
104 | ⋮ }, | 104 | CompletionItem { |
105 | ⋮ CompletionItem { | 105 | label: "pub(crate)", |
106 | ⋮ label: "pub(crate)", | 106 | source_range: [78; 78), |
107 | ⋮ source_range: [78; 78), | 107 | delete: [78; 78), |
108 | ⋮ delete: [78; 78), | 108 | insert: "pub(crate) $0", |
109 | ⋮ insert: "pub(crate) $0", | 109 | kind: Snippet, |
110 | ⋮ kind: Snippet, | 110 | }, |
111 | ⋮ }, | 111 | ]"### |
112 | ⋮] | 112 | ); |
113 | "### | ||
114 | ); | ||
115 | } | 113 | } |
116 | } | 114 | } |