diff --git a/tests/cli-rustup.rs b/tests/cli-rustup.rs index a897b7a60f0..5bf26882a73 100644 --- a/tests/cli-rustup.rs +++ b/tests/cli-rustup.rs @@ -1548,6 +1548,35 @@ components = [ "rust-bongo" ] }); } +#[test] +fn file_override_toml_format_specify_profile() { + setup(&|config| { + expect_ok(config, &["rustup", "set", "profile", "default"]); + expect_stderr_ok( + config, + &["rustup", "default", "stable"], + "downloading component 'rust-docs'", + ); + + let cwd = config.current_dir(); + let toolchain_file = cwd.join("rust-toolchain"); + raw::write_file( + &toolchain_file, + r#" +[toolchain] +profile = "minimal" +channel = "nightly" +"#, + ) + .unwrap(); + expect_not_stdout_ok( + config, + &["rustup", "component", "list"], + for_host!("rust-docs-{} (installed)"), + ); + }); +} + #[test] fn directory_override_beats_file_override() { setup(&|config| {