()
| 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() { |
nothing calls this directly
no test coverage detected