File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ use std::io::Write;
14
14
use std:: process:: Stdio ;
15
15
use std:: sync:: Mutex ;
16
16
17
+ macro_rules! for_host {
18
+ ( $s: expr) => {
19
+ & format!( $s, this_host_triple( ) )
20
+ } ;
21
+ }
22
+
17
23
pub fn setup_ ( complex : bool , f : & dyn Fn ( & Config ) ) {
18
24
let scenario = if complex {
19
25
Scenario :: UnavailableRls
@@ -411,3 +417,15 @@ fn test_succeed_if_rustup_sh_already_installed_env_var_set() {
411
417
assert ! ( !out. stdout. contains( "Continue? (y/N)" ) ) ;
412
418
} )
413
419
}
420
+
421
+ #[ test]
422
+ fn installing_when_already_installed_updates_toolchain ( ) {
423
+ setup ( & |config| {
424
+ run_input ( config, & [ "rustup-init" ] , "\n \n " ) ;
425
+ let out = run_input ( config, & [ "rustup-init" ] , "\n \n " ) ;
426
+ println ! ( "stdout:\n {}\n ...\n " , out. stdout) ;
427
+ assert ! ( out
428
+ . stdout
429
+ . contains( for_host!( "stable-{} unchanged - 1.1.0 (hash-stable-1.1.0)" ) ) ) ;
430
+ } )
431
+ }
You can’t perform that action at this time.
0 commit comments