diff options
Diffstat (limited to 'globset/src/glob.rs')
-rw-r--r-- | globset/src/glob.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/globset/src/glob.rs b/globset/src/glob.rs index ff7b74aa..05467d50 100644 --- a/globset/src/glob.rs +++ b/globset/src/glob.rs @@ -1155,6 +1155,7 @@ mod tests { matches!(matchrec22, ".*/**", ".abc/abc"); matches!(matchrec23, "foo/**", "foo"); matches!(matchrec24, "**/foo/bar", "foo/bar"); + matches!(matchrec25, "some/*/needle.txt", "some/one/needle.txt"); matches!(matchrange1, "a[0-9]b", "a0b"); matches!(matchrange2, "a[0-9]b", "a9b"); @@ -1243,6 +1244,13 @@ mod tests { nmatches!(matchnot27, "a[^0-9]b", "a0b"); nmatches!(matchnot28, "a[^0-9]b", "a9b"); nmatches!(matchnot29, "[^-]", "-"); + nmatches!(matchnot30, "some/*/needle.txt", "some/needle.txt"); + nmatches!( + matchrec31, + "some/*/needle.txt", "some/one/two/needle.txt", SLASHLIT); + nmatches!( + matchrec32, + "some/*/needle.txt", "some/one/two/three/needle.txt", SLASHLIT); macro_rules! extract { ($which:ident, $name:ident, $pat:expr, $expect:expr) => { |