Initialize Tizen 2.3
[framework/base/tizen-locale.git] / iconvdata / tst-tables.sh
1 #!/bin/sh
2 # Copyright (C) 2000,2001,2002,2003,2004,2007 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4 # Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
5 #
6
7 # The GNU C Library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
11
12 # The GNU C Library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # 02111-1307 USA.
21
22 # Checks that the iconv() implementation (in both directions) for the
23 # stateless encodings agrees with the corresponding charmap table.
24
25 common_objpfx=$1
26 objpfx=$2
27 cross_test_wrapper="$3"
28
29 status=0
30
31 cat <<EOF |
32   # Single-byte and other "small" encodings come here.
33   # Keep this list in the same order as gconv-modules.
34   #
35   # charset name    table name          comment
36   ASCII             ANSI_X3.4-1968
37   ISO646-GB         BS_4730
38   ISO646-CA         CSA_Z243.4-1985-1
39   ISO646-CA2        CSA_Z243.4-1985-2
40   ISO646-DE         DIN_66003
41   ISO646-DK         DS_2089
42   ISO646-ES         ES
43   ISO646-ES2        ES2
44   ISO646-CN         GB_1988-80
45   ISO646-IT         IT
46   ISO646-JP         JIS_C6220-1969-RO
47   ISO646-JP-OCR-B   JIS_C6229-1984-B
48   ISO646-YU         JUS_I.B1.002
49   ISO646-KR         KSC5636
50   ISO646-HU         MSZ_7795.3
51   ISO646-CU         NC_NC00-10
52   ISO646-FR         NF_Z_62-010
53   ISO646-FR1        NF_Z_62-010_1973
54   ISO646-NO         NS_4551-1
55   ISO646-NO2        NS_4551-2
56   ISO646-PT         PT
57   ISO646-PT2        PT2
58   ISO646-SE         SEN_850200_B
59   ISO646-SE2        SEN_850200_C
60   ISO-8859-1
61   ISO-8859-2
62   ISO-8859-3
63   ISO-8859-4
64   ISO-8859-5
65   ISO-8859-6
66   ISO-8859-7
67   ISO-8859-8
68   ISO-8859-9
69   ISO-8859-9E
70   ISO-8859-10
71   ISO-8859-11
72   ISO-8859-13
73   ISO-8859-14
74   ISO-8859-15
75   ISO-8859-16
76   T.61-8BIT
77   ISO_6937
78   #ISO_6937-2        ISO-IR-90          Handling of combining marks is broken
79   KOI-8
80   KOI8-R
81   LATIN-GREEK
82   LATIN-GREEK-1
83   HP-ROMAN8
84   HP-ROMAN9
85   HP-TURKISH8
86   HP-THAI8
87   HP-GREEK8
88   EBCDIC-AT-DE
89   EBCDIC-AT-DE-A
90   EBCDIC-CA-FR
91   EBCDIC-DK-NO
92   EBCDIC-DK-NO-A
93   EBCDIC-ES
94   EBCDIC-ES-A
95   EBCDIC-ES-S
96   EBCDIC-FI-SE
97   EBCDIC-FI-SE-A
98   EBCDIC-FR
99   EBCDIC-IS-FRISS
100   EBCDIC-IT
101   EBCDIC-PT
102   EBCDIC-UK
103   EBCDIC-US
104   IBM037
105   IBM038
106   IBM256
107   IBM273
108   IBM274
109   IBM275
110   IBM277
111   IBM278
112   IBM280
113   IBM281
114   IBM284
115   IBM285
116   IBM290
117   IBM297
118   IBM420
119   IBM423
120   IBM424
121   IBM437
122   IBM500
123   IBM850
124   IBM851
125   IBM852
126   IBM855
127   IBM856
128   IBM857
129   IBM860
130   IBM861
131   IBM862
132   IBM863
133   IBM864
134   IBM865
135   IBM866
136   IBM866NAV
137   IBM868
138   IBM869
139   IBM870
140   IBM871
141   IBM875
142   IBM880
143   IBM891
144   IBM903
145   IBM904
146   IBM905
147   IBM918
148   IBM922
149   IBM1004
150   IBM1026
151   #IBM1046                              Differs from the AIX and JDK converters
152   IBM1047
153   IBM1124
154   IBM1129
155   IBM1160
156   IBM1161
157   IBM1132
158   IBM1133
159   IBM1162
160   IBM1163
161   IBM1164
162   CP1125
163   CP1250
164   CP1251
165   CP1252
166   CP1253
167   CP1254
168   CP1255
169   CP1256
170   CP1257
171   CP1258
172   IBM874
173   CP737
174   CP775
175   MACINTOSH
176   IEC_P27-1
177   ASMO_449
178   ISO-IR-99         ANSI_X3.110-1983
179   ISO-IR-139        CSN_369103
180   CWI
181   DEC-MCS
182   ECMA-CYRILLIC
183   ISO-IR-153        GOST_19768-74
184   GREEK-CCITT
185   GREEK7
186   GREEK7-OLD
187   INIS
188   INIS-8
189   INIS-CYRILLIC
190   ISO_2033          ISO_2033-1983
191   ISO_5427
192   ISO_5427-EXT
193   #ISO_5428                             Handling of combining marks is broken
194   ISO_10367-BOX
195   MAC-IS
196   MAC-UK
197   CP10007
198   NATS-DANO
199   NATS-SEFI
200   WIN-SAMI-2        SAMI-WS2
201   ISO-IR-197
202   TIS-620
203   KOI8-U
204   #ISIRI-3342                         This charset concept is completely broken
205   VISCII
206   KOI8-T
207   GEORGIAN-PS
208   GEORGIAN-ACADEMY
209   ISO-IR-209
210   MAC-SAMI
211   ARMSCII-8
212   TCVN5712-1
213   TSCII
214   PT154
215   RK1048
216   MIK
217   BRF
218   MAC-CENTRALEUROPE
219   KOI8-RU
220   #
221   # Multibyte encodings come here
222   #
223   SJIS              SHIFT_JIS
224   CP932             WINDOWS-31J
225   #IBM932                               This converter looks quite strange
226   #IBM943                               This converter looks quite strange
227   EUC-KR
228   CP949
229   JOHAB
230   BIG5
231   BIG5HKSCS         BIG5-HKSCS
232   EUC-JP
233   EUC-JP-MS
234   EUC-CN            GB2312
235   GBK
236   EUC-TW
237   GB18030
238   EUC-JISX0213
239   SHIFT_JISX0213
240   #
241   # Stateful encodings not testable this way
242   #
243   #IBM930
244   #IBM933
245   #IBM935
246   #IBM937
247   #IBM939
248   #ISO-2022-JP
249   #ISO-2022-JP-2
250   #ISO-2022-JP-3
251   #ISO-2022-KR
252   #ISO-2022-CN
253   #ISO-2022-CN-EXT
254   #UTF-7
255   #
256 EOF
257 while read charset charmap; do
258   if test "$charset" = GB18030; then echo "This might take a while" 1>&2; fi
259   case ${charset} in \#*) continue;; esac
260   echo -n "Testing ${charset}" 1>&2
261   # Redirect input from /dev/null, so that using ssh (which reads its
262   # input before the remote program needs it) won't consume the rest of the 
263   # charset/charmap table, making the while loop terminate early.
264   if ${SHELL} tst-table.sh ${common_objpfx} ${objpfx} "${cross_test_wrapper}" ${charset} ${charmap} < /dev/null; then
265     echo 1>&2
266   else
267     echo "failed: ./tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}"
268     echo " *** FAILED ***" 1>&2
269     exit 1
270   fi
271 done
272
273 exit $?