feat: tokenizing whole strings in match and not_match

This commit is contained in:
kevin zhao
2025-11-12 12:49:47 -05:00
parent 814c6506d2
commit d3aafb93f3
3 changed files with 56 additions and 31 deletions

View File

@@ -112,8 +112,11 @@ fn match_and_not_match_examples_are_enforced() {
let policy_src = r#"
prefix_rule(
pattern = ["git", "status"],
match = [["git", "status"]],
not_match = [["git", "--config", "color.status=always", "status"]],
match = [["git", "status"], "git status"],
not_match = [
["git", "--config", "color.status=always", "status"],
"git --config color.status=always status",
],
)
"#;
let parser = PolicyParser::new("test.codexpolicy", policy_src);