diff --git a/.vscode/settings.json b/.vscode/settings.json index 0e74a4aa..7d1c4f6e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "cSpell.words": [ + "aarch", "ABORTIFHUNG", "appdata", "appname", diff --git a/src/types/mirror.rs b/src/types/mirror.rs index 35c32ebd..bec732fc 100644 --- a/src/types/mirror.rs +++ b/src/types/mirror.rs @@ -193,7 +193,7 @@ impl MirrorPkgSoftware { .unwrap() .as_micros() as u64, url_template: - "http:/localhost:3000/api/redirect?path=/nep/{scope}/{software}/{fileName}" + "http:/localhost:3000/api/redirect?path=/nep/{scope}/{software}/{file_name}" .to_string(), tree, } @@ -225,7 +225,7 @@ pub struct SearchResult { #[test] fn test_mirror_pkg_software() { - assert!(MirrorPkgSoftware::_demo() + MirrorPkgSoftware::_demo() .verify_self(&"".to_string()) - .is_ok()) + .unwrap() } diff --git a/src/types/steps/delete.rs b/src/types/steps/delete.rs index 97bac5eb..38980b28 100644 --- a/src/types/steps/delete.rs +++ b/src/types/steps/delete.rs @@ -56,7 +56,7 @@ fn delete(target: &String, force: bool) -> Result<()> { Err(anyhow!("Error(Delete):Failed to delete '{target}' : '{e}', enable field 'force' to try shredding")) } } else { - log!("Log(Delete):Deleted '{target}' by moving to recycle bin"); + log!("Debug(Delete):Deleted '{target}' by moving to recycle bin"); Ok(()) } } diff --git a/src/types/steps/wait.rs b/src/types/steps/wait.rs index fa70d65b..99bb3619 100644 --- a/src/types/steps/wait.rs +++ b/src/types/steps/wait.rs @@ -154,7 +154,7 @@ fn test_wait() { .unwrap(); let elapsed = now.elapsed(); - assert!(Duration::from_millis(500) <= elapsed && elapsed <= Duration::from_millis(550)); + assert!(Duration::from_millis(500) <= elapsed && elapsed <= Duration::from_millis(600)); // 测试过短条件等待 let d = Duration::from_millis(200); diff --git a/src/utils/arch.rs b/src/utils/arch.rs index 85e9fe99..d5a1f5ed 100644 --- a/src/utils/arch.rs +++ b/src/utils/arch.rs @@ -68,8 +68,8 @@ fn test_parse_arch() { assert_eq!(parse_arch(&"x64".to_string()).unwrap(), SysArch::X64); assert_eq!(parse_arch(&"X86".to_string()).unwrap(), SysArch::X86); assert_eq!(parse_arch(&"x86".to_string()).unwrap(), SysArch::X86); - assert_eq!(parse_arch(&"AMD64".to_string()).unwrap(), SysArch::ARM64); - assert_eq!(parse_arch(&"amd64".to_string()).unwrap(), SysArch::ARM64); + assert_eq!(parse_arch(&"ARM64".to_string()).unwrap(), SysArch::ARM64); + assert_eq!(parse_arch(&"aRm64".to_string()).unwrap(), SysArch::ARM64); assert!(parse_arch(&"RISC".to_string()).is_err()); }