Project

General

Profile

Bug #13412 » check-towlower.c

Andreas Wacknitz, 2020-12-30 04:08 PM

 
1
/* Test app originally from Bruno Haible, adapted by Andreas Wacknitz
2
 * Checks whether towlower(0x038A) is broken.
3
 */
4

    
5
#include <locale.h>
6
#include <stdio.h>
7
#include <wchar.h>
8
#include <wctype.h>
9

    
10
int main ()
11
{
12
  if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL)
13
    {
14
      fprintf (stderr, "setlocale did not find the locale.\n");
15
      return 1;
16
    }
17
  printf ("towlower (0x038A) = 0x%04X,\t(expected 0x03AF)\n", towlower (0x038A));
18
  printf ("towupper (0x038A) = 0x%04X,\t(expected 0x038A)\n", towupper (0x038A));
19
  printf ("towlower (0x03AF) = 0x%04X,\t(expected 0x03AF)\n", towlower (0x03AF));
20
  printf ("towupper (0x03AF) = 0x%04X,\t(expected 0x038A)\n", towupper (0x03AF));
21
  printf ("towlower (0x03B0) = 0x%04X,\t(expected 0x03B0)\n", towlower (0x03B0));
22
  printf ("towupper (0x03B0) = 0x%04X,\t(expected 0x03B0)\n", towupper (0x03B0));
23
}
24

    
(2-2/2)