Welcome to mirror list, hosted at ThFree Co, Russian Federation.

twctrans.c « newlib.wctype « testsuite « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8b7b50e5ad09a1345d5867b24525af07b943507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <wctype.h>
#include <newlib.h>
#include "check.h"

int main()
{
  wctrans_t x;

  x = wctrans ("tolower");
  CHECK (x != 0);
  CHECK (towctrans (L'A', x) == towlower (L'A'));
  CHECK (towctrans (L'5', x) == towlower (L'5'));

  x = wctrans ("toupper");
  CHECK (x != 0);
  CHECK (towctrans (L'c', x) == towupper (L'c'));
  CHECK (towctrans (L'9', x) == towupper (L'9'));

  x = wctrans ("unknown");
  CHECK (x == 0);

  exit (0);
}