added test for bad regex

This commit is contained in:
epi
2020-11-26 07:34:49 -06:00
parent 20e7d0195e
commit 81d21ce557

View File

@@ -783,4 +783,13 @@ mod tests {
let result = reached_max_depth(&url, 0, 2);
assert!(result);
}
#[test]
#[should_panic]
/// call initialize with a bad regex, triggering a panic
fn initialize_panics_on_bad_regex() {
let mut config = Configuration::default();
config.filter_regex = vec![r"(".to_string()];
initialize(1, &config);
}
}