Skip to content

Commit

Permalink
tests: Ensure profile honoured in rust-toolchain
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Silverstone <[email protected]>
  • Loading branch information
kinnison committed Nov 29, 2020
1 parent 3e8d291 commit 0ad29a0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/cli-rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down

0 comments on commit 0ad29a0

Please sign in to comment.