Skip to content

Commit eae3131

Browse files
committed
More tests for override auto-install
1 parent 6824535 commit eae3131

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/cli-v2.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,24 @@ fn remove_override_toolchain_err_handling() {
187187
});
188188
}
189189

190+
#[test]
191+
fn file_override_toolchain_err_handling() {
192+
setup(&|config| {
193+
let cwd = config.current_dir();
194+
let toolchain_file = cwd.join("rust-toolchain");
195+
rustup_utils::raw::write_file(&toolchain_file, "beta").unwrap();
196+
expect_stderr_ok(config, &["rustc", "--version"], "info: installing component");
197+
});
198+
}
199+
200+
#[test]
201+
fn plus_override_toolchain_err_handling() {
202+
setup(&|config| {
203+
expect_err(config, &["rustc", "+beta"],
204+
for_host!("toolchain 'beta-{0}' is not installed"));
205+
});
206+
}
207+
190208
#[test]
191209
fn bad_sha_on_manifest() {
192210
setup(&|config| {

0 commit comments

Comments
 (0)