diff options
author | Yerkebulan Tulibergenov <[email protected]> | 2019-01-14 01:59:56 +0000 |
---|---|---|
committer | Yerkebulan Tulibergenov <[email protected]> | 2019-01-14 01:59:56 +0000 |
commit | a996b66cc65741d51270f4ebf97c5fc35e957f17 (patch) | |
tree | c570cfe5b0e189e11f20e4d7614e7299d94ebb10 /crates/ra_ide_api_light/src/assists | |
parent | a901cb4f342b0a784e716e29934999cc036dc835 (diff) |
add failing test test_introduce_var_block_expr_second_to_last
Diffstat (limited to 'crates/ra_ide_api_light/src/assists')
-rw-r--r-- | crates/ra_ide_api_light/src/assists/introduce_variable.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_ide_api_light/src/assists/introduce_variable.rs b/crates/ra_ide_api_light/src/assists/introduce_variable.rs index 523ec7034..d5b7487e0 100644 --- a/crates/ra_ide_api_light/src/assists/introduce_variable.rs +++ b/crates/ra_ide_api_light/src/assists/introduce_variable.rs | |||
@@ -141,4 +141,21 @@ fn foo() { | |||
141 | ); | 141 | ); |
142 | } | 142 | } |
143 | 143 | ||
144 | #[test] | ||
145 | fn test_introduce_var_block_expr_second_to_last() { | ||
146 | check_assist_range( | ||
147 | introduce_variable, | ||
148 | " | ||
149 | fn foo() { | ||
150 | <|>{ let x = 0; x }<|> | ||
151 | something_else(); | ||
152 | }", | ||
153 | " | ||
154 | fn foo() { | ||
155 | let <|>var_name = { let x = 0; x }; | ||
156 | var_name | ||
157 | something_else(); | ||
158 | }", | ||
159 | ); | ||
160 | } | ||
144 | } | 161 | } |