Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ranweiler committed Jan 28, 2023
1 parent 01175a2 commit 94677ea
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/agent/coverage/src/allowlist/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,17 @@ bad/*

Ok(())
}

#[test]
fn test_allowlist_escape() -> Result<()> {
const GOOD: &str = "good (x[y]) {z}+ %#S";
const BAD: &str = "bad* a+b @!{ (x)[y]{z}";

let text = format!("{GOOD}\n! {BAD}");
let allowlist = AllowList::parse(&text)?;

assert!(allowlist.is_allowed(GOOD));
assert!(!allowlist.is_allowed(BAD));

Ok(())
}

0 comments on commit 94677ea

Please sign in to comment.