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

Function test_walk_files_with_prefix

atomic-core/src/output/memory.rs:1283–1297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1281
1282 #[test]
1283 fn test_walk_files_with_prefix() {
1284 let wc = Memory::new();
1285 wc.add_file("root.txt", b"");
1286 wc.add_file("src/main.rs", b"");
1287 wc.add_file("src/lib.rs", b"");
1288 wc.add_file("tests/test.rs", b"");
1289
1290 let files = wc.walk_files("src").unwrap();
1291
1292 assert_eq!(files.len(), 2);
1293 assert!(files.contains(&"src/main.rs".to_string()));
1294 assert!(files.contains(&"src/lib.rs".to_string()));
1295 assert!(!files.contains(&"root.txt".to_string()));
1296 assert!(!files.contains(&"tests/test.rs".to_string()));
1297 }
1298
1299 #[test]
1300 fn test_walk_files_with_prefix_trailing_slash() {

Callers

nothing calls this directly

Calls 3

add_fileMethod · 0.45
unwrapMethod · 0.45
walk_filesMethod · 0.45

Tested by

no test coverage detected