mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix more tests
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -95,9 +95,9 @@ pub fn expand_environment_strings<P: AsRef<str>>(input: P) -> Result<String> {
|
||||
|
||||
#[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<P: AsRef<str>>(str: P) -> Result<String> {
|
||||
|
||||
Reference in New Issue
Block a user