Skip to content

Commit

Permalink
test(cli-misc): simplify version_mentions_rustc_version_confusion()
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Jul 15, 2024
1 parent 88c7ca6 commit d0d9bdb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/suite/cli_misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ async fn smoke_test() {
#[tokio::test]
async fn version_mentions_rustc_version_confusion() {
let mut cx = CliTestContext::new(Scenario::SimpleV2).await;
let out = cx.config.run("rustup", vec!["--version"], &[]).await;
assert!(out.ok);
assert!(out
.stderr
.contains("This is the version for the rustup toolchain manager"));

cx.config
.expect_stderr_ok(
&["rustup", "--version"],
"This is the version for the rustup toolchain manager",
)
.await;

cx.config
.expect_ok(&["rustup", "toolchain", "install", "nightly"])
.await;

let out = cx
.config
.run("rustup", vec!["+nightly", "--version"], &[])
cx.config
.expect_stderr_ok(
&["rustup", "+nightly", "--version"],
"The currently active `rustc` version is `1.3.0",
)
.await;
assert!(out.ok);
assert!(out
.stderr
.contains("The currently active `rustc` version is `1.3.0"));
}

#[tokio::test]
Expand Down

0 comments on commit d0d9bdb

Please sign in to comment.