diff --git a/tests/cli-self-upd.rs b/tests/cli-self-upd.rs index 2a6175ffcd4..9869cac5fbc 100644 --- a/tests/cli-self-upd.rs +++ b/tests/cli-self-upd.rs @@ -567,15 +567,16 @@ fn update_exact() { let version = env!("CARGO_PKG_VERSION"); let expected_output = &(r"info: checking for self-updates info: downloading self-update -info: rustup updated successfully to " - .to_owned() - + version - + " "); update_setup(&|config, _| { expect_ok(config, &["rustup-init", "-y"]); - expect_ok_ex(config, &["rustup", "self", "update"], r"", expected_output) + expect_ok_ex( + config, + &["rustup", "self", "update"], + &format!(" rustup updated - (toolchain not installed) (from {})\n\n", version), + expected_output, + ) }); } @@ -697,9 +698,10 @@ fn update_no_change() { expect_ok_ex( config, &["rustup", "self", "update"], - r"", + r" rustup unchanged - (toolchain not installed) + +", r"info: checking for self-updates -info: already up-to-date ", ); });