Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jan 8, 2019
1 parent b4eba12 commit 5a062ce
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/cli-v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,3 +837,22 @@ fn update_unavailable_std() {
);
});
}

#[test]
fn update_unavailable_force() {
setup(&|config| {
let ref trip = TargetTriple::from_build();
expect_ok(config, &["rustup", "update", "nightly"]);
expect_ok(config, &["rustup", "component", "add", "rls", "--toolchain", "nightly"]);
make_component_unavailable(config, "rls-preview", trip);
expect_err(
config,
&["rustup", "update", "nightly"],
&format!(
"component 'rls' for target '{}' is unavailable for download",
trip
),
);
expect_ok(config, &["rustup", "update", "nightly", "--force"]);
});
}

0 comments on commit 5a062ce

Please sign in to comment.