Skip to content

Commit 2d0ff5f

Browse files
committed
tests: Ensure profile honoured in rust-toolchain
Signed-off-by: Daniel Silverstone <[email protected]>
1 parent 96e9f19 commit 2d0ff5f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/cli-rustup.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,35 @@ components = [ "rust-bongo" ]
15481548
});
15491549
}
15501550

1551+
#[test]
1552+
fn file_override_toml_format_specify_profile() {
1553+
setup(&|config| {
1554+
expect_ok(config, &["rustup", "set", "profile", "default"]);
1555+
expect_stderr_ok(
1556+
config,
1557+
&["rustup", "default", "stable"],
1558+
"downloading component 'rust-docs'",
1559+
);
1560+
1561+
let cwd = config.current_dir();
1562+
let toolchain_file = cwd.join("rust-toolchain");
1563+
raw::write_file(
1564+
&toolchain_file,
1565+
r#"
1566+
[toolchain]
1567+
profile = "minimal"
1568+
channel = "nightly"
1569+
"#,
1570+
)
1571+
.unwrap();
1572+
expect_not_stdout_ok(
1573+
config,
1574+
&["rustup", "component", "list"],
1575+
for_host!("rust-docs-{} (installed)"),
1576+
);
1577+
});
1578+
}
1579+
15511580
#[test]
15521581
fn directory_override_beats_file_override() {
15531582
setup(&|config| {

0 commit comments

Comments
 (0)