diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-31 21:04:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-31 21:04:34 +0000 |
commit | f798bf32a2b076fe51898ab623d8dcab850d3dd1 (patch) | |
tree | 0d2fb936fc2a95a3b8951e0b1734fb908ddd20b5 /posix | |
parent | 306eeae553820c7ac30a94ac890a3fe70fc68909 (diff) | |
download | glibc-f798bf32a2b076fe51898ab623d8dcab850d3dd1.tar.gz glibc-f798bf32a2b076fe51898ab623d8dcab850d3dd1.tar.xz glibc-f798bf32a2b076fe51898ab623d8dcab850d3dd1.zip |
Update.
2001-01-31 Ulrich Drepper <drepper@redhat.com> * posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale. * posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/fnmatch_loop.c | 7 | ||||
-rw-r--r-- | posix/tst-fnmatch.input | 92 |
2 files changed, 91 insertions, 8 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 1e1f284b48..8e78765fc8 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -353,17 +353,11 @@ FCT (pattern, string, no_leading_period, flags) /* We found a table entry. Now see whether the character we are currently at has the same equivalance class value. */ -# if !WIDE_CHAR_VERSION int len = weights[idx]; -# endif int32_t idx2; const UCHAR *np = (const UCHAR *) n; idx2 = findidx (&np); -# if WIDE_CHAR_VERSION - if (idx2 != 0 && weights[idx] == weights[idx2]) - goto matched; -# else if (idx2 != 0 && len == weights[idx2]) { int cnt = 0; @@ -376,7 +370,6 @@ FCT (pattern, string, no_leading_period, flags) if (cnt == len) goto matched; } -# endif } } diff --git a/posix/tst-fnmatch.input b/posix/tst-fnmatch.input index 3e0fb95ca2..85dda08486 100644 --- a/posix/tst-fnmatch.input +++ b/posix/tst-fnmatch.input @@ -1,5 +1,5 @@ # Tests for fnmatch. -# Copyright (C) 2000 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributes by Ulrich Drepper <drepper@redhat.com>. # @@ -460,6 +460,96 @@ de_DE.ISO-8859-1 "ä" "[[=ä=]b]" 0 de_DE.ISO-8859-1 "b" "[[=ä=]b]" 0 de_DE.ISO-8859-1 "c" "[[=ä=]b]" NOMATCH + +# And with a multibyte character set. +de_DE.UTF-8 "a" "[a-z]" 0 +de_DE.UTF-8 "z" "[a-z]" 0 +de_DE.UTF-8 "ä" "[a-z]" 0 +de_DE.UTF-8 "ö" "[a-z]" 0 +de_DE.UTF-8 "ü" "[a-z]" 0 +de_DE.UTF-8 "A" "[a-z]" NOMATCH +de_DE.UTF-8 "Z" "[a-z]" NOMATCH +de_DE.UTF-8 "Ä" "[a-z]" NOMATCH +de_DE.UTF-8 "Ö" "[a-z]" NOMATCH +de_DE.UTF-8 "Ãœ" "[a-z]" NOMATCH +de_DE.UTF-8 "a" "[A-Z]" NOMATCH +de_DE.UTF-8 "z" "[A-Z]" NOMATCH +de_DE.UTF-8 "ä" "[A-Z]" NOMATCH +de_DE.UTF-8 "ö" "[A-Z]" NOMATCH +de_DE.UTF-8 "ü" "[A-Z]" NOMATCH +de_DE.UTF-8 "A" "[A-Z]" 0 +de_DE.UTF-8 "Z" "[A-Z]" 0 +de_DE.UTF-8 "Ä" "[A-Z]" 0 +de_DE.UTF-8 "Ö" "[A-Z]" 0 +de_DE.UTF-8 "Ãœ" "[A-Z]" 0 +de_DE.UTF-8 "a" "[[:lower:]]" 0 +de_DE.UTF-8 "z" "[[:lower:]]" 0 +de_DE.UTF-8 "ä" "[[:lower:]]" 0 +de_DE.UTF-8 "ö" "[[:lower:]]" 0 +de_DE.UTF-8 "ü" "[[:lower:]]" 0 +de_DE.UTF-8 "A" "[[:lower:]]" NOMATCH +de_DE.UTF-8 "Z" "[[:lower:]]" NOMATCH +de_DE.UTF-8 "Ä" "[[:lower:]]" NOMATCH +de_DE.UTF-8 "Ö" "[[:lower:]]" NOMATCH +de_DE.UTF-8 "Ãœ" "[[:lower:]]" NOMATCH +de_DE.UTF-8 "a" "[[:upper:]]" NOMATCH +de_DE.UTF-8 "z" "[[:upper:]]" NOMATCH +de_DE.UTF-8 "ä" "[[:upper:]]" NOMATCH +de_DE.UTF-8 "ö" "[[:upper:]]" NOMATCH +de_DE.UTF-8 "ü" "[[:upper:]]" NOMATCH +de_DE.UTF-8 "A" "[[:upper:]]" 0 +de_DE.UTF-8 "Z" "[[:upper:]]" 0 +de_DE.UTF-8 "Ä" "[[:upper:]]" 0 +de_DE.UTF-8 "Ö" "[[:upper:]]" 0 +de_DE.UTF-8 "Ãœ" "[[:upper:]]" 0 +de_DE.UTF-8 "a" "[[:alpha:]]" 0 +de_DE.UTF-8 "z" "[[:alpha:]]" 0 +de_DE.UTF-8 "ä" "[[:alpha:]]" 0 +de_DE.UTF-8 "ö" "[[:alpha:]]" 0 +de_DE.UTF-8 "ü" "[[:alpha:]]" 0 +de_DE.UTF-8 "A" "[[:alpha:]]" 0 +de_DE.UTF-8 "Z" "[[:alpha:]]" 0 +de_DE.UTF-8 "Ä" "[[:alpha:]]" 0 +de_DE.UTF-8 "Ö" "[[:alpha:]]" 0 +de_DE.UTF-8 "Ãœ" "[[:alpha:]]" 0 + +de_DE.UTF-8 "a" "[[=a=]b]" 0 +de_DE.UTF-8 "â" "[[=a=]b]" 0 +de_DE.UTF-8 "à " "[[=a=]b]" 0 +de_DE.UTF-8 "á" "[[=a=]b]" 0 +de_DE.UTF-8 "ä" "[[=a=]b]" 0 +de_DE.UTF-8 "b" "[[=a=]b]" 0 +de_DE.UTF-8 "c" "[[=a=]b]" NOMATCH +de_DE.UTF-8 "a" "[[=â=]b]" 0 +de_DE.UTF-8 "â" "[[=â=]b]" 0 +de_DE.UTF-8 "à " "[[=â=]b]" 0 +de_DE.UTF-8 "á" "[[=â=]b]" 0 +de_DE.UTF-8 "ä" "[[=â=]b]" 0 +de_DE.UTF-8 "b" "[[=â=]b]" 0 +de_DE.UTF-8 "c" "[[=â=]b]" NOMATCH +de_DE.UTF-8 "a" "[[=à =]b]" 0 +de_DE.UTF-8 "â" "[[=à =]b]" 0 +de_DE.UTF-8 "à " "[[=à =]b]" 0 +de_DE.UTF-8 "á" "[[=à =]b]" 0 +de_DE.UTF-8 "ä" "[[=à =]b]" 0 +de_DE.UTF-8 "b" "[[=à =]b]" 0 +de_DE.UTF-8 "c" "[[=à =]b]" NOMATCH +de_DE.UTF-8 "a" "[[=á=]b]" 0 +de_DE.UTF-8 "â" "[[=á=]b]" 0 +de_DE.UTF-8 "à " "[[=á=]b]" 0 +de_DE.UTF-8 "á" "[[=á=]b]" 0 +de_DE.UTF-8 "ä" "[[=á=]b]" 0 +de_DE.UTF-8 "b" "[[=á=]b]" 0 +de_DE.UTF-8 "c" "[[=á=]b]" NOMATCH +de_DE.UTF-8 "a" "[[=ä=]b]" 0 +de_DE.UTF-8 "â" "[[=ä=]b]" 0 +de_DE.UTF-8 "à " "[[=ä=]b]" 0 +de_DE.UTF-8 "á" "[[=ä=]b]" 0 +de_DE.UTF-8 "ä" "[[=ä=]b]" 0 +de_DE.UTF-8 "b" "[[=ä=]b]" 0 +de_DE.UTF-8 "c" "[[=ä=]b]" NOMATCH + + # Test of GNU extensions. C "x" "x" 0 PATHNAME|LEADING_DIR C "x/y" "x" 0 PATHNAME|LEADING_DIR |