File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -2266,6 +2266,35 @@ channel = "nightly"
22662266 . await ;
22672267}
22682268
2269+ #[ tokio:: test]
2270+ async fn default_profile_is_respected_with_rust_toolchain_file ( ) {
2271+ let mut cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
2272+ cx. config
2273+ . expect_ok ( & [ "rustup" , "set" , "profile" , "minimal" ] )
2274+ . await ;
2275+ cx. config . expect_ok ( & [ "rustup" , "default" , "stable" ] ) . await ;
2276+
2277+ let cwd = cx. config . current_dir ( ) ;
2278+ let toolchain_file = cwd. join ( "rust-toolchain" ) ;
2279+ raw:: write_file (
2280+ & toolchain_file,
2281+ r#"
2282+ [toolchain]
2283+ channel = "nightly"
2284+ "# ,
2285+ )
2286+ . unwrap ( ) ;
2287+ cx. config
2288+ . expect_ok ( & [ "rustup" , "toolchain" , "install" ] )
2289+ . await ;
2290+ cx. config
2291+ . expect_not_stdout_ok (
2292+ & [ "rustup" , "component" , "list" ] ,
2293+ for_host ! ( "rust-docs-{} (installed)" ) ,
2294+ )
2295+ . await ;
2296+ }
2297+
22692298#[ tokio:: test]
22702299async fn close_file_override_beats_far_directory_override ( ) {
22712300 let mut cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
You can’t perform that action at this time.
0 commit comments