Skip to content

Commit fba0f3e

Browse files
committed
test
1 parent 4b912e8 commit fba0f3e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/cli-rustup.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,23 @@ fn toolchain_update_is_like_update_except_that_bare_install_is_an_error() {
748748
});
749749
}
750750

751+
#[test]
752+
fn force_update() {
753+
setup(&|config| {
754+
expect_ok(config, &["rustup", "default", "nightly"]);
755+
expect_ok(config, &["rustup", "component", "add", "rustfmt-preview"]);
756+
expect_err(config,
757+
&["rustup", "update"],
758+
"does not contain component 'rustfmt-preview' for target");
759+
expect_ok(config, &["rustup", "update", "--force"]);
760+
});
761+
}
762+
751763
#[test]
752764
fn proxy_toolchain_shorthand() {
753765
setup(&|config| {
754766
expect_ok(config, &["rustup", "default", "stable"]);
755-
expect_ok(config, &["rustup", "toolchain", "update" , "nightly"]);
767+
expect_ok(config, &["rustup", "toolchain", "update", "nightly"]);
756768
expect_stdout_ok(config, &["rustc", "--version"], "hash-s-2");
757769
expect_stdout_ok(config, &["rustc", "+stable", "--version"], "hash-s-2");
758770
expect_stdout_ok(config, &["rustc", "+nightly", "--version"], "hash-n-2");

0 commit comments

Comments
 (0)