From f76a69d946ea8292a6709ac5ff66cf28ddd8c4b6 Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Sun, 18 May 2025 23:15:13 +0100 Subject: [PATCH] Fix more tests --- src/bins/src/commands/uninstall.rs | 2 +- src/bins/src/windows/runtimes.rs | 2 +- src/bins/src/windows/util.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bins/src/commands/uninstall.rs b/src/bins/src/commands/uninstall.rs index aa462583..91009485 100644 --- a/src/bins/src/commands/uninstall.rs +++ b/src/bins/src/commands/uninstall.rs @@ -20,7 +20,7 @@ pub fn uninstall(locator: &VelopackLocator, delete_self: bool) -> Result<()> { windows::remove_all_shortcuts_for_root_dir(&root_path); info!("Removing directory '{}'", root_path.to_string_lossy()); - let _ = remove_dir_all::remove_dir_all(&root_path); + let _ = remove_dir_all::remove_dir_contents(&root_path); if let Err(e) = windows::registry::remove_uninstall_entry(&locator) { error!("Unable to remove uninstall registry entry ({}).", e); diff --git a/src/bins/src/windows/runtimes.rs b/src/bins/src/windows/runtimes.rs index 515ffa94..6632a32d 100644 --- a/src/bins/src/windows/runtimes.rs +++ b/src/bins/src/windows/runtimes.rs @@ -498,7 +498,7 @@ fn test_dotnet_detects_installed_versions() { assert!(parse_dotnet_version("net8-runtime").unwrap().is_installed()); assert!(parse_dotnet_version("net8-desktop").unwrap().is_installed()); assert!(parse_dotnet_version("net8-asp").unwrap().is_installed()); - assert!(parse_dotnet_version("net8-sdk").unwrap().is_installed()); + assert!(parse_dotnet_version("net9-sdk").unwrap().is_installed()); assert!(!parse_dotnet_version("net11").unwrap().is_installed()); } diff --git a/src/bins/src/windows/util.rs b/src/bins/src/windows/util.rs index 779acf3b..1bdd1732 100644 --- a/src/bins/src/windows/util.rs +++ b/src/bins/src/windows/util.rs @@ -95,9 +95,9 @@ pub fn expand_environment_strings>(input: P) -> Result { #[test] fn test_expand_environment_strings() { - assert_eq!(expand_environment_strings("%windir%").unwrap(), "C:\\Windows"); - assert_eq!(expand_environment_strings("%windir%\\system32").unwrap(), "C:\\Windows\\system32"); - assert_eq!(expand_environment_strings("%windir%\\system32\\").unwrap(), "C:\\Windows\\system32\\"); + assert!(expand_environment_strings("%windir%").unwrap().eq_ignore_ascii_case("C:\\Windows")); + assert!(expand_environment_strings("%windir%\\system32").unwrap().eq_ignore_ascii_case("C:\\Windows\\system32")); + assert!(expand_environment_strings("%windir%\\system32\\").unwrap().eq_ignore_ascii_case("C:\\Windows\\system32\\")); } pub fn get_long_path>(str: P) -> Result {