Skip to content

Commit 5a062ce

Browse files
committed
add test
1 parent b4eba12 commit 5a062ce

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/cli-v2.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,3 +837,22 @@ fn update_unavailable_std() {
837837
);
838838
});
839839
}
840+
841+
#[test]
842+
fn update_unavailable_force() {
843+
setup(&|config| {
844+
let ref trip = TargetTriple::from_build();
845+
expect_ok(config, &["rustup", "update", "nightly"]);
846+
expect_ok(config, &["rustup", "component", "add", "rls", "--toolchain", "nightly"]);
847+
make_component_unavailable(config, "rls-preview", trip);
848+
expect_err(
849+
config,
850+
&["rustup", "update", "nightly"],
851+
&format!(
852+
"component 'rls' for target '{}' is unavailable for download",
853+
trip
854+
),
855+
);
856+
expect_ok(config, &["rustup", "update", "nightly", "--force"]);
857+
});
858+
}

0 commit comments

Comments
 (0)