radicle/git/canonical: Add explicit test case for fast_glob pattern match syntax

This commit is contained in:
Adrian Duke 2026-05-01 16:30:26 +01:00 committed by Fintan Halpenny
parent 80d30d3b59
commit 080790d84e
1 changed files with 11 additions and 0 deletions

View File

@ -551,3 +551,14 @@ fn matches_expands_globs_appropriately() {
&git::fmt::qualified!("refs/heads/quarterly/hardened/15-stable/main/2026q2") &git::fmt::qualified!("refs/heads/quarterly/hardened/15-stable/main/2026q2")
)); ));
} }
#[test]
fn matches_exactly_curly_braces() {
let exact = qualified_pattern!("refs/heads/{foo,bar}");
assert!(matches(
&exact,
&git::fmt::qualified!("refs/heads/{foo,bar}")
));
assert!(!matches(&exact, &git::fmt::qualified!("refs/heads/foo")));
assert!(!matches(&exact, &git::fmt::qualified!("refs/heads/bar")));
}