#[cfg(test)]
mod tests {
use super::super::build_globset;
use std::path::Path;
#[test]
fn build_globset_returns_none_for_empty() {
assert!(build_globset(&[]).expect("empty globset").is_none());
}
#[test]
fn build_globset_matches_patterns() {
let set = build_globset(&["**/*.rs".to_string()])
.expect("valid globset")
.expect("some globset");
assert!(set.is_match(Path::new("src/main.rs")));
assert!(!set.is_match(Path::new("src/main.ts")));
}
}