()
| 298 | |
| 299 | #[test] |
| 300 | fn test_take_snapshot_nested_dirs() { |
| 301 | let dir = TempDir::new().unwrap(); |
| 302 | fs::create_dir_all(dir.path().join("src/auth")).unwrap(); |
| 303 | fs::write(dir.path().join("src/main.rs"), "fn main() {}").unwrap(); |
| 304 | fs::write(dir.path().join("src/auth/login.rs"), "fn login() {}").unwrap(); |
| 305 | |
| 306 | let snapshot = take_snapshot(dir.path(), &[".atomic".to_string()]).unwrap(); |
| 307 | assert_eq!(snapshot.len(), 2); |
| 308 | assert!(snapshot.contains_key(Path::new("src/main.rs"))); |
| 309 | assert!(snapshot.contains_key(Path::new("src/auth/login.rs"))); |
| 310 | } |
| 311 | |
| 312 | #[test] |
| 313 | fn test_take_snapshot_ignores_atomic_dir() { |
nothing calls this directly
no test coverage detected