From f798bf32a2b076fe51898ab623d8dcab850d3dd1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 31 Jan 2001 21:04:34 +0000 Subject: Update. 2001-01-31 Ulrich Drepper * posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale. * posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets. --- ChangeLog | 5 +++ posix/fnmatch_loop.c | 7 ---- posix/tst-fnmatch.input | 92 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 96 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37a51d5..95ef29e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-01-31 Ulrich Drepper + + * posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale. + * posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets. + 2001-01-30 Ulrich Drepper * iconv/gconv_open.c (__gconv_open): Set conv_flags if IGNORE is diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 1e1f284..8e78765 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 3e0fb95..85dda08 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 . # @@ -460,6 +460,96 @@ de_DE.ISO-8859-1 " 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 -- cgit v1.1