mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 12:26:38 -05:00
Implement documented wildcard escaping in wnmatch_sub
This commit is contained in:
parent
3bd3eff451
commit
35977dadc9
3 changed files with 45 additions and 0 deletions
|
|
@ -863,6 +863,24 @@ struct {
|
|||
{ "Movies*", "Movies4", 0, 0 },
|
||||
{ "Movies*", "Movies4/file.mkv", 0, 1 },
|
||||
|
||||
/* escaping of wildcard metacharacters */
|
||||
{ "foo\\*bar", "foo*bar", 0, 0 },
|
||||
{ "foo\\?bar", "foo?bar", 0, 0 },
|
||||
{ "foo\\[bar", "foo[bar", 0, 0 },
|
||||
{ "foo\\]bar", "foo]bar", 0, 0 },
|
||||
{ "foo\\\\bar", "foo\\bar", 0, 0 },
|
||||
{ "foo\\*bar", "fooXXXbar", 0, 1 },
|
||||
{ "foo\\?bar", "fooXbar", 0, 1 },
|
||||
{ "foo\\[bar", "fooXbar", 0, 1 },
|
||||
{ "foo\\]bar", "fooXbar", 0, 1 },
|
||||
{ "foo*bar", "fooXXXbar", 0, 0 },
|
||||
{ "foo?bar", "fooXbar", 0, 0 },
|
||||
{ "foo[abc]bar", "fooabar", 0, 0 },
|
||||
{ "foo\\abar", "foo\\abar", 0, 0 },
|
||||
{ "foo\\abar", "fooabar", 0, 1 },
|
||||
{ "foo\\", "foo\\", 0, 0 },
|
||||
{ "foo\\", "foo", 0, 1 },
|
||||
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue