Skip to content

Commit 0197ff4

Browse files
committed
tests: Add test exposing 2601
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent 4a2e283 commit 0197ff4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/cli-v2.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,3 +1517,32 @@ fn install_allow_downgrade() {
15171517
expect_component_executable(config, "rls");
15181518
});
15191519
}
1520+
1521+
#[test]
1522+
fn regression_2601() {
1523+
// We're checking that we don't regress per #2601
1524+
setup(&|config| {
1525+
expect_ok(
1526+
config,
1527+
&[
1528+
"rustup",
1529+
"toolchain",
1530+
"install",
1531+
"--profile",
1532+
"minimal",
1533+
"nightly",
1534+
"--component",
1535+
"rust-src",
1536+
"--no-self-update",
1537+
],
1538+
);
1539+
// The bug exposed in #2601 was that the above would end up installing
1540+
// rust-src-$ARCH which would then have to be healed on the following
1541+
// command, resulting in a reinstallation.
1542+
expect_stderr_ok(
1543+
config,
1544+
&["rustup", "component", "add", "rust-src"],
1545+
"info: component 'rust-src' is up to date",
1546+
);
1547+
});
1548+
}

0 commit comments

Comments
 (0)