Skip to content

Commit

Permalink
tests: rust-toolchain + profile in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored and djc committed Oct 3, 2024
1 parent 9c29717 commit e774ac0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/suite/cli_rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2266,6 +2266,35 @@ channel = "nightly"
.await;
}

#[tokio::test]
async fn default_profile_is_respected_with_rust_toolchain_file() {
let mut cx = CliTestContext::new(Scenario::SimpleV2).await;
cx.config
.expect_ok(&["rustup", "set", "profile", "minimal"])
.await;
cx.config.expect_ok(&["rustup", "default", "stable"]).await;

let cwd = cx.config.current_dir();
let toolchain_file = cwd.join("rust-toolchain");
raw::write_file(
&toolchain_file,
r#"
[toolchain]
channel = "nightly"
"#,
)
.unwrap();
cx.config
.expect_ok(&["rustup", "toolchain", "install"])
.await;
cx.config
.expect_not_stdout_ok(
&["rustup", "component", "list"],
for_host!("rust-docs-{} (installed)"),
)
.await;
}

#[tokio::test]
async fn close_file_override_beats_far_directory_override() {
let mut cx = CliTestContext::new(Scenario::SimpleV2).await;
Expand Down

0 comments on commit e774ac0

Please sign in to comment.