mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 01:28:00 -04:00
fnmatch(): Add test for r254091 (pattern with single backslash).
This test cannot be converted to an sh(1) test because the syntax would be invalid. PR: 181129 MFC after: 1 week
This commit is contained in:
parent
6c43122a42
commit
88dae73d36
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,8 @@ struct testcase {
|
|||
"\\[", "\\[", 0, FNM_NOMATCH,
|
||||
"\\(", "\\(", 0, FNM_NOMATCH,
|
||||
"\\a", "\\a", 0, FNM_NOMATCH,
|
||||
"\\", "\\", 0, FNM_NOMATCH,
|
||||
"\\", "", 0, 0,
|
||||
"\\*", "\\*", FNM_NOESCAPE, 0,
|
||||
"\\?", "\\?", FNM_NOESCAPE, 0,
|
||||
"\\", "\\", FNM_NOESCAPE, 0,
|
||||
|
|
@ -236,6 +238,8 @@ write_sh_tests(const char *progname, int num)
|
|||
if (strchr(t->pattern, '\'') != NULL ||
|
||||
strchr(t->string, '\'') != NULL)
|
||||
continue;
|
||||
if (t->flags == 0 && strcmp(t->pattern, "\\") == 0)
|
||||
continue;
|
||||
if (num == 1 && t->flags == 0)
|
||||
printf("test%smatch '%s' '%s'\n",
|
||||
t->result == FNM_NOMATCH ? "no" : "",
|
||||
|
|
|
|||
Loading…
Reference in a new issue