MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_take_snapshot_with_files

Function test_take_snapshot_with_files

atomic-agent/src/watcher/fallback.rs:288–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286
287 #[test]
288 fn test_take_snapshot_with_files() {
289 let dir = TempDir::new().unwrap();
290 fs::write(dir.path().join("a.rs"), "fn main() {}").unwrap();
291 fs::write(dir.path().join("b.rs"), "fn test() {}").unwrap();
292
293 let snapshot = take_snapshot(dir.path(), &[".atomic".to_string()]).unwrap();
294 assert_eq!(snapshot.len(), 2);
295 assert!(snapshot.contains_key(Path::new("a.rs")));
296 assert!(snapshot.contains_key(Path::new("b.rs")));
297 }
298
299 #[test]
300 fn test_take_snapshot_nested_dirs() {

Callers

nothing calls this directly

Calls 4

writeFunction · 0.85
take_snapshotFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected