mirror of
https://git.proxmox.com/git/pathpatterns
synced 2025-07-27 10:41:04 +00:00
typo and debug print fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
865fa73fbc
commit
37c4c9b20f
@ -495,7 +495,7 @@ impl Pattern {
|
|||||||
&& ((ci + 1) == components.len()
|
&& ((ci + 1) == components.len()
|
||||||
|| components[ci + 1].starts_with_slash())
|
|| components[ci + 1].starts_with_slash())
|
||||||
{
|
{
|
||||||
// Assuming we matched `foo/` and are at `/` `**` `/`, see if we an let
|
// Assuming we matched `foo/` and are at `/` `**` `/`, see if we can let
|
||||||
// it match nothing, so that `foo/` `**` `/bar` can match `foo/bar`.
|
// it match nothing, so that `foo/` `**` `/bar` can match `foo/bar`.
|
||||||
//
|
//
|
||||||
// Under the condition that the previous component ended with a slash
|
// Under the condition that the previous component ended with a slash
|
||||||
@ -700,7 +700,6 @@ fn test() {
|
|||||||
PatternFlag::PATH_NAME | PatternFlag::IGNORE_CASE,
|
PatternFlag::PATH_NAME | PatternFlag::IGNORE_CASE,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
eprintln!("{:#?}", pattern);
|
|
||||||
assert!(pattern.matches("aBcUl3"));
|
assert!(pattern.matches("aBcUl3"));
|
||||||
assert!(pattern.matches("AbCuL9"));
|
assert!(pattern.matches("AbCuL9"));
|
||||||
assert!(!pattern.matches("aBgUl3"));
|
assert!(!pattern.matches("aBgUl3"));
|
||||||
|
Loading…
Reference in New Issue
Block a user