add a test for non-existent file
Browse files- src/results/aggregator.rs +12 -0
src/results/aggregator.rs
CHANGED
@@ -257,4 +257,16 @@ mod tests {
|
|
257 |
|
258 |
Ok(())
|
259 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
}
|
|
|
257 |
|
258 |
Ok(())
|
259 |
}
|
260 |
+
|
261 |
+
#[test]
|
262 |
+
fn test_filter_with_lists_file_not_found() {
|
263 |
+
let mut map_to_be_filtered = HashMap::new();
|
264 |
+
|
265 |
+
let mut resultant_map = HashMap::new();
|
266 |
+
|
267 |
+
// Call the `filter_with_lists` function with a non-existent file path
|
268 |
+
let result = filter_with_lists(&mut map_to_be_filtered, &mut resultant_map, "non-existent-file.txt");
|
269 |
+
|
270 |
+
assert!(result.is_err());
|
271 |
+
}
|
272 |
}
|