Skip to content

Commit

Permalink
Add test for invalid glob
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosichert committed Jan 8, 2021
1 parent 18cdd01 commit 4a95559
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/file-source/tests/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ fn test_glob_include_curly_braces_exclude_star() -> Result<(), Box<dyn std::erro

Ok(())
}

#[test]
fn test_glob_include_invalid() -> Result<(), Box<dyn std::error::Error>> {
let include_patterns = ["{{}".to_owned()];
let exclude_patterns = [];
let glob = Glob::new(&include_patterns, &exclude_patterns);

assert!(glob.is_err());

Ok(())
}

0 comments on commit 4a95559

Please sign in to comment.