Skip to content

Commit 579b855

Browse files
committed
test(cli-misc): simplify version_mentions_rustc_version_confusion()
1 parent 3320801 commit 579b855

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/suite/cli_misc.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ async fn smoke_test() {
2222
#[tokio::test]
2323
async fn version_mentions_rustc_version_confusion() {
2424
let mut cx = CliTestContext::new(Scenario::SimpleV2).await;
25-
let out = cx.config.run("rustup", vec!["--version"], &[]).await;
26-
assert!(out.ok);
27-
assert!(out
28-
.stderr
29-
.contains("This is the version for the rustup toolchain manager"));
25+
26+
cx.config
27+
.expect_stderr_ok(
28+
&["rustup", "--version"],
29+
"This is the version for the rustup toolchain manager",
30+
)
31+
.await;
3032

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

35-
let out = cx
36-
.config
37-
.run("rustup", vec!["+nightly", "--version"], &[])
37+
cx.config
38+
.expect_stderr_ok(
39+
&["rustup", "+nightly", "--version"],
40+
"The currently active `rustc` version is `1.3.0",
41+
)
3842
.await;
39-
assert!(out.ok);
40-
assert!(out
41-
.stderr
42-
.contains("The currently active `rustc` version is `1.3.0"));
4343
}
4444

4545
#[tokio::test]

0 commit comments

Comments
 (0)