XFFXFF commited on
Commit
4280545
·
1 Parent(s): 5c0397c

add a test for non-existent file

Browse files
Files changed (1) hide show
  1. 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
  }