From b0ac7a64bb2c39075d902463d70b30c4d10de22a Mon Sep 17 00:00:00 2001 From: rami3l Date: Fri, 12 Apr 2024 21:24:21 +0800 Subject: [PATCH] test(self-update): ensure the resolution of #3739 --- tests/suite/cli_self_upd.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/suite/cli_self_upd.rs b/tests/suite/cli_self_upd.rs index e9cba3bc38b..03c8b1399c4 100644 --- a/tests/suite/cli_self_upd.rs +++ b/tests/suite/cli_self_upd.rs @@ -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") + .unwrap(), + version, + ) + } }); }