All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.
Rust
test: skip the ENOTDIR remove_cached assertion on Windows
Corey Chiua1e8cf616797
diff --git a/crates/wake-core/src/remote.rs b/crates/wake-core/src/remote.rsindex a189df0..f3af16a 100644--- a/crates/wake-core/src/remote.rs+++ b/crates/wake-core/src/remote.rs@@ -479,10 +479,15 @@ mod tests {std::fs::create_dir_all(&sub).unwrap();assert_eq!(remove_cached(&dir.path().join("d")), Ok(()));assert!(!sub.exists());- // 路径穿过一个普通文件(ENOTDIR):不是"不存在",必须报错- std::fs::write(&file, b"x").unwrap();- let err = remove_cached(&file.join("child")).unwrap_err();- assert!(err.contains("cannot inspect stale cache"), "{err}");+ // 路径穿过一个普通文件(ENOTDIR):不是"不存在",必须报错。Windows 对+ // 这种路径报 ERROR_PATH_NOT_FOUND → NotFound,函数按约定当作缺席返回+ // Ok,断言只在 POSIX 上成立(CI windows-2022 自 v0.4.0 起因此红)+ #[cfg(not(windows))]+ {+ std::fs::write(&file, b"x").unwrap();+ let err = remove_cached(&file.join("child")).unwrap_err();+ assert!(err.contains("cannot inspect stale cache"), "{err}");+ }}#[test]