Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle/git/canonical: Add explicit test case for fast_glob pattern match syntax
✓ CI success Adrian Duke committed 3 days ago
commit 5d93a46c0e32d07e4eb00d6ac2c02e4bd2db9fdc
parent 33d5a12c8b6d0e744c60f4c0da8cbf00d83073a9
1 passed (1 total) View logs
1 file changed +11 -0
modified crates/radicle/src/git/canonical/rules/test.rs
@@ -551,3 +551,14 @@ fn matches_expands_globs_appropriately() {
        &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")));
+
}