Skip to content

Commit c2ef191

Browse files
test(custom-toolchain): migrate to .expect() API
This change is done to be consistent with the new migration to the `.expect()` API's that were defined in #4334 and #4342, and are showcased in the latest PR for migration (#4343).
1 parent 91f3af0 commit c2ef191

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

tests/suite/cli_v2.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -836,28 +836,34 @@ async fn list_targets_v1_toolchain() {
836836

837837
#[tokio::test]
838838
async fn list_targets_custom_toolchain() {
839-
let mut cx = CliTestContext::new(Scenario::SimpleV2).await;
840-
cx.config.expect_ok(&["rustup", "default", "stable"]).await;
839+
let cx = CliTestContext::new(Scenario::SimpleV2).await;
840+
cx.config
841+
.expect(&["rustup", "default", "stable"])
842+
.await
843+
.is_ok();
841844
let stable_path = cx
842845
.config
843846
.rustupdir
844847
.join("toolchains")
845848
.join(format!("stable-{}", this_host_triple()));
846849
cx.config
847-
.expect_ok(&[
850+
.expect([
848851
"rustup",
849852
"toolchain",
850853
"link",
851854
"stuff",
852855
&stable_path.to_string_lossy(),
853856
])
854-
.await;
857+
.await
858+
.is_ok();
855859
cx.config
856-
.expect_stdout_ok(
857-
&["rustup", "+stuff", "target", "list", "--installed"],
858-
&this_host_triple().to_string(),
859-
)
860-
.await;
860+
.expect(["rustup", "+stuff", "target", "list", "--installed"])
861+
.await
862+
.with_stdout(snapbox::str![[r#"
863+
[HOST_TRIPLE]
864+
865+
"#]])
866+
.is_ok();
861867
}
862868

863869
#[tokio::test]

0 commit comments

Comments
 (0)