From b323a9248deca960b10345d2795527035c749abd Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Tue, 11 Nov 2025 20:33:52 -0500 Subject: [PATCH] updating basic.rs to have a less obvious not match --- codex-rs/execpolicy2/tests/basic.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/codex-rs/execpolicy2/tests/basic.rs b/codex-rs/execpolicy2/tests/basic.rs index ba444e3cae..40758445c1 100644 --- a/codex-rs/execpolicy2/tests/basic.rs +++ b/codex-rs/execpolicy2/tests/basic.rs @@ -113,7 +113,7 @@ fn match_and_not_match_examples_are_enforced() { prefix_rule( pattern = ["git", "status"], match = [["git", "status"]], - not_match = [["git", "reset", "--hard"]], + not_match = [["git", "--config", "color.status=always", "status"]], ) "#; let parser = PolicyParser::new("test.policy", policy_src); @@ -127,7 +127,12 @@ prefix_rule( }"#]] .assert_eq(&match_eval.to_string()); - let no_match_eval = policy.evaluate(&tokens(&["git", "reset", "--hard"])); + let no_match_eval = policy.evaluate(&tokens(&[ + "git", + "--config", + "color.status=always", + "status", + ])); expect!["NoMatch"].assert_eq(&no_match_eval.to_string()); }