Skip to content

Commit

Permalink
test(self-update): ensure the 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 f011e8f
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::<String, _>("DisplayVersion")
.as_deref(),
Ok(version)
)
}
});
}

Expand Down

0 comments on commit f011e8f

Please sign in to comment.