On FreeBSD 11.0 and 12.0, I see test failures

FAIL: test-mbmemcasecmp2.sh
===========================

../../gltests/test-mbmemcasecmp.h:359: assertion 'my_casecmp (input2, SIZEOF 
(input2), input3, SIZEOF (input3)) == 0' failed
Abort trap (core dumped)
FAIL test-mbmemcasecmp2.sh (exit status: 134)

FAIL: test-mbmemcasecoll2.sh
============================

../../gltests/test-mbmemcasecmp.h:359: assertion 'my_casecmp (input2, SIZEOF 
(input2), input3, SIZEOF (input3)) == 0' failed
Abort trap (core dumped)
FAIL test-mbmemcasecoll2.sh (exit status: 134)

This is caused by a wrong 'towlower' mapping table. This program
====================================================================
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
int main ()
{
  if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL)
    {
      fprintf (stderr, "setlocale did not find the locale.\n");
      return 1;
    }
  printf ("towlower (0x038A) = 0x%04X\n", towlower (0x038A));
  printf ("towupper (0x038A) = 0x%04X\n", towupper (0x038A));
  printf ("towlower (0x03AF) = 0x%04X\n", towlower (0x03AF));
  printf ("towupper (0x03AF) = 0x%04X\n", towupper (0x03AF));
  printf ("towlower (0x03B0) = 0x%04X\n", towlower (0x03B0));
  printf ("towupper (0x03B0) = 0x%04X\n", towupper (0x03B0));
}
====================================================================

is supposed to print
towlower (0x038A) = 0x03AF
towupper (0x038A) = 0x038A
towlower (0x03AF) = 0x03AF
towupper (0x03AF) = 0x038A
towlower (0x03B0) = 0x03B0
towupper (0x03B0) = 0x03B0
but actually prints
towlower (0x038A) = 0x03B0
towupper (0x038A) = 0x038A
towlower (0x03AF) = 0x03AF
towupper (0x03AF) = 0x038A
towlower (0x03B0) = 0x03B0
towupper (0x03B0) = 0x03B0

It is fixed in FreeBSD 12.2.


Reply via email to