~ubuntu-branches/ubuntu/hardy/belocs-locales-data/hardy

« back to all changes in this revision

Viewing changes to localedata/tests-mbwc/dat_mbrlen.c

  • Committer: Bazaar Package Importer
  • Author(s): Denis Barbier
  • Date: 2005-05-17 22:09:38 UTC
  • Revision ID: james.westby@ubuntu.com-20050517220938-814x2iu6tkj3ml2o
Tags: upstream-2.3.4
ImportĀ upstreamĀ versionĀ 2.3.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
 
3
 *
 
4
 *       FILE:  dat_mbrlen.c
 
5
 *
 
6
 *       MBRLEN:  size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
 
7
 */
 
8
 
 
9
/*
 
10
 *  NOTE:
 
11
 *        (1) A mbstate object is initialized for
 
12
 *            every new data record by the test program.
 
13
 *
 
14
 *        (2) USE_MBCURMAX is defined as a value of 99.
 
15
 *
 
16
 */
 
17
 
 
18
 
 
19
TST_MBRLEN tst_mbrlen_loc [] = {
 
20
  {
 
21
    { Tmbrlen, TST_LOC_de },
 
22
    {
 
23
      { /*----------------- #01 -----------------*/
 
24
        {
 
25
          {
 
26
            { 1, "",       0,              0, 0 },
 
27
            { 1, "",       1,              0, 0 },
 
28
            { 1, "\300",           USE_MBCURMAX,   0, 0 },
 
29
          }
 
30
        },
 
31
        {
 
32
          {
 
33
            { 0,                1,  0,               },
 
34
            { 0,                1,  0,               },
 
35
            { 0,                1,  1,               },
 
36
          }
 
37
        }
 
38
      },
 
39
      { /*----------------- #02 -----------------*/
 
40
        {
 
41
          {
 
42
            { 1, "\300\001",   0,                  0, 0 },
 
43
            { 1, "\300\001",   1,                  0, 0 },
 
44
            { 1, "\317\001",   USE_MBCURMAX,   0, 0 },
 
45
          }
 
46
        },
 
47
        {
 
48
          {
 
49
            { 0,                1,  0,               },
 
50
            { 0,                1,  1,               },
 
51
            { 0,                1,  1,               },
 
52
          }
 
53
        }
 
54
      },
 
55
      { .is_last = 1 }
 
56
    }
 
57
  },
 
58
  {
 
59
    { Tmbrlen, TST_LOC_enUS },
 
60
    {
 
61
      { /*----------------- #01 -----------------*/
 
62
        {
 
63
          {
 
64
            { 1, "A",      0,              0, 0 },
 
65
            { 1, "A",      1,              0, 0 },
 
66
            { 1, "A",      USE_MBCURMAX,   0, 0 },
 
67
          }
 
68
        },
 
69
        {
 
70
          {
 
71
            { 0,                1,  0,               },
 
72
            { 0,                1,  1,               },
 
73
            { 0,                1,  1,               },
 
74
          }
 
75
        }
 
76
      },
 
77
      { /*----------------- #02 -----------------*/
 
78
        {
 
79
          {
 
80
            { 1, "\317\001",   0,                  1, 0 },
 
81
            { 1, "\317\001",   1,                  1, 0 },
 
82
            { 1, "\317\001",   USE_MBCURMAX,   1, 0 },
 
83
          }
 
84
        },
 
85
        {
 
86
          {
 
87
            { 0,                1,  0,               },
 
88
            { EILSEQ,   1, -1,               },
 
89
            { EILSEQ,   1, -1,               },
 
90
          }
 
91
        }
 
92
      },
 
93
      { .is_last = 1 }
 
94
    }
 
95
  },
 
96
  {
 
97
    { Tmbrlen, TST_LOC_eucJP },
 
98
    {
 
99
      { /*----------------- #01 -----------------*/
 
100
        {
 
101
          {
 
102
            { 1, "\317\302",   1,                  1, 1 },
 
103
            { 0, "",           0,                  1, 0 },
 
104
            { 1, "\317\302",   USE_MBCURMAX,       1, 1 },
 
105
          }
 
106
        },
 
107
        {
 
108
          {
 
109
            { 0,                1, -2,               },
 
110
            { 0,                1, -1,               },
 
111
            { 0,                1,  2,               },
 
112
          }
 
113
        }
 
114
      },
 
115
      { /*----------------- #02 -----------------*/
 
116
        {
 
117
          {
 
118
            { 1, "\317",           1,              1, 0 },
 
119
            { 1, "\302",           1,              1, 0 },
 
120
            { 1, "\317\302",   USE_MBCURMAX,   0, 0 },
 
121
          }
 
122
        },
 
123
        {
 
124
          {
 
125
            { 0,                1, -2,               },
 
126
#ifdef SHOJI_IS_RIGHT
 
127
            { 0,                1, +2,               },
 
128
#else
 
129
            /* XXX ISO C explicitly says that the return value does not
 
130
               XXX reflect the bytes contained in the state.  */
 
131
            { 0,                1, +1,               },
 
132
#endif
 
133
            { 0,                1,  2,               },
 
134
          }
 
135
        }
 
136
      },
 
137
      { /*----------------- #03 -----------------*/
 
138
        {
 
139
          {
 
140
            { 1, "\216\217",   0,                  0, 0 },
 
141
            { 1, "\216\217",   1,                  0, 0 },
 
142
            { 1, "\216\217",   USE_MBCURMAX,   0, 0 },
 
143
          }
 
144
        },
 
145
        {
 
146
          {
 
147
            { 0,                1,  0,               },
 
148
            { 0,                1, -2,               },
 
149
            { EILSEQ,   1, -1,               },
 
150
          }
 
151
        }
 
152
      },
 
153
      { .is_last = 1 }
 
154
    }
 
155
  },
 
156
  {
 
157
    { Tmbrlen, TST_LOC_end }
 
158
  }
 
159
};