This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.6.0-0.2


On Jul 26 15:30, Ken Brown wrote:
> On 7/26/2016 1:37 PM, Corinna Vinschen wrote:
> > Now for some testing of the new API...? :)
> 
> There seems to be a collation bug.  Here's a test case, extracted from the
> emacs test suite:
> 
> $ cat collation_test.c
> #include <wchar.h>
> #include <locale.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <errno.h>
> 
> int
> main (void)
> {
>   locale_t loc = newlocale (LC_COLLATE_MASK | LC_CTYPE_MASK,
>                             "en_US.UTF-8", 0);
>   if (!loc)
>     {
>       perror ("newlocale");
>       exit (1);
>     }
> 
>   wchar_t *p1 = L"xyzzy", *p2 = L"XYZZY";
>   errno = 0;
>   int res = wcscoll_l (p1, p2, loc);
>   if (errno)
>     {
>       perror ("wcscoll_l");
>       exit (1);
>     }
>   char res_ch = res < 0 ? '<' : res > 0 ? '>' : '=';
>   freelocale (loc);
>   printf ("\"%ls\" %c \"%ls\" in locale en_US.UTF-8\n", p1, res_ch, p2);
> }
> 
> $ gcc collation_test.c
> 
> $ ./a
> "xyzzy" > "XYZZY" in locale en_US.UTF-8

Thanks a lot for the testcase.  I applied a patch, but it's late here so
I create a new testversion tomorrow.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]