0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 05:58:21 -05:00

add a test for non-existent file

This commit is contained in:
xffxff 2023-08-24 09:32:22 +08:00
parent 5c0397c456
commit 4280545e8c

View File

@ -257,4 +257,16 @@ mod tests {
Ok(())
}
#[test]
fn test_filter_with_lists_file_not_found() {
let mut map_to_be_filtered = HashMap::new();
let mut resultant_map = HashMap::new();
// Call the `filter_with_lists` function with a non-existent file path
let result = filter_with_lists(&mut map_to_be_filtered, &mut resultant_map, "non-existent-file.txt");
assert!(result.is_err());
}
}