Skip to content

Commit

Permalink
test(self-update): add test ensuring resolution of #3739
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Apr 12, 2024
1 parent e7cfe18 commit 71b8800
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/suite/cli_self_upd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,24 @@ info: downloading self-update
&["rustup", "self", "update"],
&format!(" rustup updated - {version} (from {version})\n\n",),
&expected_output,
)
);

#[cfg(windows)]
{
use winreg::{enums::HKEY_CURRENT_USER, RegKey};

const RUSTUP_UNINSTALL_ENTRY: &str =
r"Software\Microsoft\Windows\CurrentVersion\Uninstall\Rustup";

assert_eq!(
RegKey::predef(HKEY_CURRENT_USER)
.open_subkey(RUSTUP_UNINSTALL_ENTRY)
.unwrap()
.get_value("DisplayVersion")
.as_deref(),
Ok(version)
)
}
});
}

Expand Down

0 comments on commit 71b8800

Please sign in to comment.