File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -300,11 +300,33 @@ info: downloading self-update
300
300
301
301
update_setup ( & |config, _| {
302
302
config. expect_ok ( & [ "rustup-init" , "-y" , "--no-modify-path" ] ) ;
303
+
304
+ #[ cfg( windows) ]
305
+ const RUSTUP_UNINSTALL_ENTRY : & str =
306
+ r"Software\Microsoft\Windows\CurrentVersion\Uninstall\Rustup" ;
307
+
308
+ #[ cfg( windows) ]
309
+ winreg:: RegKey :: predef ( winreg:: enums:: HKEY_CURRENT_USER )
310
+ . open_subkey ( RUSTUP_UNINSTALL_ENTRY )
311
+ . unwrap ( )
312
+ . delete_value ( "DisplayVersion" )
313
+ . unwrap ( ) ;
314
+
303
315
config. expect_ok_ex (
304
316
& [ "rustup" , "self" , "update" ] ,
305
317
& format ! ( " rustup updated - {version} (from {version})\n \n " , ) ,
306
318
& expected_output,
307
- )
319
+ ) ;
320
+
321
+ #[ cfg( windows) ]
322
+ assert_eq ! (
323
+ winreg:: RegKey :: predef( winreg:: enums:: HKEY_CURRENT_USER )
324
+ . open_subkey( RUSTUP_UNINSTALL_ENTRY )
325
+ . unwrap( )
326
+ . get_value:: <String , _>( "DisplayVersion" )
327
+ . unwrap( ) ,
328
+ version,
329
+ ) ;
308
330
} ) ;
309
331
}
310
332
You can’t perform that action at this time.
0 commit comments