@@ -153,6 +153,22 @@ fn uninstall_deletes_bins() {
153
153
} ) ;
154
154
}
155
155
156
+ #[ test]
157
+ fn uninstall_deletes_installed_toolchains ( ) {
158
+ setup_installed ( & |config| {
159
+ let path = config. customdir . join ( "custom-1" ) ;
160
+ let path = path. to_string_lossy ( ) ;
161
+ config. expect_ok ( & [ "rustup" , "toolchain" , "link" , "custom" , & path] ) ;
162
+ config. expect_ok_contains ( & [ "rustup" , "self" , "uninstall" , "-y" ] ,
163
+ "" ,
164
+ r"
165
+ info: uninstalling toolchain 'custom'
166
+ info: toolchain 'custom' uninstalled
167
+ " ) ;
168
+ assert ! ( !& config. rustupdir. join( "toolchains" ) . exists( ) )
169
+ } ) ;
170
+ }
171
+
156
172
#[ test]
157
173
fn uninstall_works_if_some_bins_dont_exist ( ) {
158
174
setup_empty_installed ( & |config| {
@@ -278,13 +294,13 @@ fn update_exact() {
278
294
let expected_output = "info: checking for self-update
279
295
info: downloading self-update
280
296
"
281
- . to_string ( ) ;
297
+ . to_string ( ) ;
282
298
283
299
update_setup ( & |config, _| {
284
300
config. expect_ok ( & [ "rustup-init" , "-y" , "--no-modify-path" ] ) ;
285
301
config. expect_ok_ex (
286
302
& [ "rustup" , "self" , "update" ] ,
287
- & format ! ( " rustup updated - {version} (from {version})\n \n " , ) ,
303
+ & format ! ( " rustup updated - {version} (from {version})\n \n " , ) ,
288
304
& expected_output,
289
305
)
290
306
} ) ;
0 commit comments