diff options
Diffstat (limited to 'posix/tst-fnmatch.c')
-rw-r--r-- | posix/tst-fnmatch.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/posix/tst-fnmatch.c b/posix/tst-fnmatch.c index 719361519c..eee50c6424 100644 --- a/posix/tst-fnmatch.c +++ b/posix/tst-fnmatch.c @@ -1,5 +1,5 @@ /* Tests for fnmatch function. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -263,6 +263,12 @@ convert_flags (const char *str) result |= FNM_CASEFOLD; len = 8; } + else if (strncasecmp (str, "EXTMATCH", 8) == 0 + && (str[8] == '|' || str[8] == '\0')) + { + result |= FNM_EXTMATCH; + len = 8; + } else return -1; @@ -315,6 +321,13 @@ flag_output (int flags) cp = stpcpy (cp, "FNM_CASEFOLD"); first = 0; } + if (flags & FNM_EXTMATCH) + { + if (! first) + *cp++ = '|'; + cp = stpcpy (cp, "FNM_EXTMATCH"); + first = 0; + } if (cp == buf) *cp++ = '0'; *cp = '\0'; |