|
4 | 4 | pub mod mock;
|
5 | 5 |
|
6 | 6 | use crate::mock::clitools::{
|
7 |
| - self, expect_err, expect_not_stderr_ok, expect_not_stdout_ok, expect_ok, expect_stderr_ok, |
8 |
| - expect_stdout_ok, set_current_dist_date, this_host_triple, Config, Scenario, |
| 7 | + self, expect_err, expect_not_stderr_ok, expect_not_stdout_ok, expect_ok, expect_ok_ex, |
| 8 | + expect_stderr_ok, expect_stdout_ok, set_current_dist_date, this_host_triple, Config, Scenario, |
9 | 9 | };
|
10 | 10 | use std::fs;
|
11 | 11 | use std::io::Write;
|
@@ -1185,3 +1185,36 @@ fn test_complete_profile_skips_missing_when_forced() {
|
1185 | 1185 | );
|
1186 | 1186 | })
|
1187 | 1187 | }
|
| 1188 | + |
| 1189 | +#[test] |
| 1190 | +fn run_with_install_flag_against_unavailable_component() { |
| 1191 | + setup(&|config| { |
| 1192 | + let trip = TargetTriple::from_build(); |
| 1193 | + make_component_unavailable(config, "rust-std", &trip); |
| 1194 | + expect_ok_ex( |
| 1195 | + config, |
| 1196 | + &[ |
| 1197 | + "rustup", |
| 1198 | + "run", |
| 1199 | + "--install", |
| 1200 | + "nightly", |
| 1201 | + "rustc", |
| 1202 | + "--version", |
| 1203 | + ], |
| 1204 | + "1.3.0 (hash-nightly-2) |
| 1205 | +", |
| 1206 | + for_host!( |
| 1207 | + r"info: syncing channel updates for 'nightly-{0}' |
| 1208 | +info: latest update on 2015-01-02, rust version 1.3.0 (hash-nightly-2) |
| 1209 | +warning: Force-skipping unavailable component 'rust-std-x86_64-apple-darwin' |
| 1210 | +info: downloading component 'cargo' |
| 1211 | +info: downloading component 'rust-docs' |
| 1212 | +info: downloading component 'rustc' |
| 1213 | +info: installing component 'cargo' |
| 1214 | +info: installing component 'rust-docs' |
| 1215 | +info: installing component 'rustc' |
| 1216 | +" |
| 1217 | + ), |
| 1218 | + ); |
| 1219 | + }); |
| 1220 | +} |
0 commit comments