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;
1414use std:: process:: Stdio ;
1515use std:: sync:: Mutex ;
1616
17+ macro_rules! for_host {
18+ ( $s: expr) => {
19+ & format!( $s, this_host_triple( ) )
20+ } ;
21+ }
22+
1723pub fn setup_ ( complex : bool , f : & dyn Fn ( & Config ) ) {
1824 let scenario = if complex {
1925 Scenario :: UnavailableRls
@@ -411,3 +417,15 @@ fn test_succeed_if_rustup_sh_already_installed_env_var_set() {
411417 assert ! ( !out. stdout. contains( "Continue? (y/N)" ) ) ;
412418 } )
413419}
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