From 6d4376180d10e35daec5453546e508eb4726fa52 Mon Sep 17 00:00:00 2001 From: roife Date: Tue, 4 Jun 2024 17:12:36 +0800 Subject: [PATCH] test(dist): add regression tests for parsing beta versions with tags --- tests/suite/cli_misc.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/suite/cli_misc.rs b/tests/suite/cli_misc.rs index 48ee5e6b64..f77fa5b35e 100644 --- a/tests/suite/cli_misc.rs +++ b/tests/suite/cli_misc.rs @@ -794,6 +794,18 @@ fn install_unavailable_platform() { }); } +// issue #1329 +#[test] +fn install_beta_with_tag() { + clitools::test(Scenario::BetaTag, &|config| { + config.expect_ok(&["rustup", "default", "1.78.0-beta"]); + config.expect_stdout_ok(&["rustc", "--version"], "1.78.0-beta"); + + config.expect_ok(&["rustup", "default", "1.79.0-beta.2"]); + config.expect_stdout_ok(&["rustc", "--version"], "1.79.0-beta.2"); + }) +} + #[test] fn update_nightly_even_with_incompat() { clitools::test(Scenario::MissingComponent, &|config| {