| xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Test nl_langinfo. |
| 3 | # Copyright (C) 2000-2016 Free Software Foundation, Inc. |
| 4 | # This file is part of the GNU C Library. |
| 5 | |
| 6 | # The GNU C Library is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU Lesser General Public |
| 8 | # License as published by the Free Software Foundation; either |
| 9 | # version 2.1 of the License, or (at your option) any later version. |
| 10 | |
| 11 | # The GNU C Library is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | # Lesser General Public License for more details. |
| 15 | |
| 16 | # You should have received a copy of the GNU Lesser General Public |
| 17 | # License along with the GNU C Library; if not, see |
| 18 | # <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | set -e |
| 21 | |
| 22 | common_objpfx=$1 |
| 23 | tst_langinfo_before_env=$2 |
| 24 | run_program_env=$3 |
| 25 | tst_langinfo_after_env=$4 |
| 26 | |
| 27 | # Run the test program. |
| 28 | cat <<"EOF" | |
| 29 | # Only decimal numerical escape sequences allowed in strings. |
| 30 | C ABDAY_1 Sun |
| 31 | C ABDAY_2 Mon |
| 32 | C ABDAY_3 Tue |
| 33 | C ABDAY_4 Wed |
| 34 | C ABDAY_5 Thu |
| 35 | C ABDAY_6 Fri |
| 36 | C ABDAY_7 Sat |
| 37 | C DAY_1 Sunday |
| 38 | C DAY_2 Monday |
| 39 | C DAY_3 Tuesday |
| 40 | C DAY_4 Wednesday |
| 41 | C DAY_5 Thursday |
| 42 | C DAY_6 Friday |
| 43 | C DAY_7 Saturday |
| 44 | C ABMON_1 Jan |
| 45 | C ABMON_2 Feb |
| 46 | C ABMON_3 Mar |
| 47 | C ABMON_4 Apr |
| 48 | C ABMON_5 May |
| 49 | C ABMON_6 Jun |
| 50 | C ABMON_7 Jul |
| 51 | C ABMON_8 Aug |
| 52 | C ABMON_9 Sep |
| 53 | C ABMON_10 Oct |
| 54 | C ABMON_11 Nov |
| 55 | C ABMON_12 Dec |
| 56 | C MON_1 January |
| 57 | C MON_2 February |
| 58 | C MON_3 March |
| 59 | C MON_4 April |
| 60 | C MON_5 May |
| 61 | C MON_6 June |
| 62 | C MON_7 July |
| 63 | C MON_8 August |
| 64 | C MON_9 September |
| 65 | C MON_10 October |
| 66 | C MON_11 November |
| 67 | C MON_12 December |
| 68 | C AM_STR AM |
| 69 | C PM_STR PM |
| 70 | C D_T_FMT "%a %b %e %H:%M:%S %Y" |
| 71 | C D_FMT "%m/%d/%y" |
| 72 | C T_FMT "%H:%M:%S" |
| 73 | C T_FMT_AMPM "%I:%M:%S %p" |
| 74 | C ABDAY_1 Sun |
| 75 | C ABDAY_2 Mon |
| 76 | C ABDAY_3 Tue |
| 77 | C ABDAY_4 Wed |
| 78 | C ABDAY_5 Thu |
| 79 | C ABDAY_6 Fri |
| 80 | C ABDAY_7 Sat |
| 81 | C DAY_1 Sunday |
| 82 | C DAY_2 Monday |
| 83 | C DAY_3 Tuesday |
| 84 | C DAY_4 Wednesday |
| 85 | C DAY_5 Thursday |
| 86 | C DAY_6 Friday |
| 87 | C DAY_7 Saturday |
| 88 | C RADIXCHAR . |
| 89 | C THOUSEP "" |
| 90 | C YESEXPR ^[yY] |
| 91 | C NOEXPR ^[nN] |
| 92 | en_US.ANSI_X3.4-1968 ABMON_1 Jan |
| 93 | en_US.ANSI_X3.4-1968 ABMON_2 Feb |
| 94 | en_US.ANSI_X3.4-1968 ABMON_3 Mar |
| 95 | en_US.ANSI_X3.4-1968 ABMON_4 Apr |
| 96 | en_US.ANSI_X3.4-1968 ABMON_5 May |
| 97 | en_US.ANSI_X3.4-1968 ABMON_6 Jun |
| 98 | en_US.ANSI_X3.4-1968 ABMON_7 Jul |
| 99 | en_US.ANSI_X3.4-1968 ABMON_8 Aug |
| 100 | en_US.ANSI_X3.4-1968 ABMON_9 Sep |
| 101 | en_US.ANSI_X3.4-1968 ABMON_10 Oct |
| 102 | en_US.ANSI_X3.4-1968 ABMON_11 Nov |
| 103 | en_US.ANSI_X3.4-1968 ABMON_12 Dec |
| 104 | en_US.ANSI_X3.4-1968 MON_1 January |
| 105 | en_US.ANSI_X3.4-1968 MON_2 February |
| 106 | en_US.ANSI_X3.4-1968 MON_3 March |
| 107 | en_US.ANSI_X3.4-1968 MON_4 April |
| 108 | en_US.ANSI_X3.4-1968 MON_5 May |
| 109 | en_US.ANSI_X3.4-1968 MON_6 June |
| 110 | en_US.ANSI_X3.4-1968 MON_7 July |
| 111 | en_US.ANSI_X3.4-1968 MON_8 August |
| 112 | en_US.ANSI_X3.4-1968 MON_9 September |
| 113 | en_US.ANSI_X3.4-1968 MON_10 October |
| 114 | en_US.ANSI_X3.4-1968 MON_11 November |
| 115 | en_US.ANSI_X3.4-1968 MON_12 December |
| 116 | en_US.ANSI_X3.4-1968 AM_STR AM |
| 117 | en_US.ANSI_X3.4-1968 PM_STR PM |
| 118 | en_US.ANSI_X3.4-1968 D_T_FMT "%a %d %b %Y %r %Z" |
| 119 | en_US.ANSI_X3.4-1968 D_FMT "%m/%d/%Y" |
| 120 | en_US.ANSI_X3.4-1968 T_FMT "%r" |
| 121 | en_US.ANSI_X3.4-1968 T_FMT_AMPM "%I:%M:%S %p" |
| 122 | en_US.ANSI_X3.4-1968 RADIXCHAR . |
| 123 | en_US.ANSI_X3.4-1968 THOUSEP , |
| 124 | en_US.ANSI_X3.4-1968 YESEXPR ^[yY].* |
| 125 | en_US.ANSI_X3.4-1968 NOEXPR ^[nN].* |
| 126 | en_US.ISO-8859-1 ABMON_1 Jan |
| 127 | en_US.ISO-8859-1 ABMON_2 Feb |
| 128 | en_US.ISO-8859-1 ABMON_3 Mar |
| 129 | en_US.ISO-8859-1 ABMON_4 Apr |
| 130 | en_US.ISO-8859-1 ABMON_5 May |
| 131 | en_US.ISO-8859-1 ABMON_6 Jun |
| 132 | en_US.ISO-8859-1 ABMON_7 Jul |
| 133 | en_US.ISO-8859-1 ABMON_8 Aug |
| 134 | en_US.ISO-8859-1 ABMON_9 Sep |
| 135 | en_US.ISO-8859-1 ABMON_10 Oct |
| 136 | en_US.ISO-8859-1 ABMON_11 Nov |
| 137 | en_US.ISO-8859-1 ABMON_12 Dec |
| 138 | en_US.ISO-8859-1 MON_1 January |
| 139 | en_US.ISO-8859-1 MON_2 February |
| 140 | en_US.ISO-8859-1 MON_3 March |
| 141 | en_US.ISO-8859-1 MON_4 April |
| 142 | en_US.ISO-8859-1 MON_5 May |
| 143 | en_US.ISO-8859-1 MON_6 June |
| 144 | en_US.ISO-8859-1 MON_7 July |
| 145 | en_US.ISO-8859-1 MON_8 August |
| 146 | en_US.ISO-8859-1 MON_9 September |
| 147 | en_US.ISO-8859-1 MON_10 October |
| 148 | en_US.ISO-8859-1 MON_11 November |
| 149 | en_US.ISO-8859-1 MON_12 December |
| 150 | en_US.ISO-8859-1 AM_STR AM |
| 151 | en_US.ISO-8859-1 PM_STR PM |
| 152 | en_US.ISO-8859-1 D_T_FMT "%a %d %b %Y %r %Z" |
| 153 | en_US.ISO-8859-1 D_FMT "%m/%d/%Y" |
| 154 | en_US.ISO-8859-1 T_FMT "%r" |
| 155 | en_US.ISO-8859-1 T_FMT_AMPM "%I:%M:%S %p" |
| 156 | en_US.ISO-8859-1 RADIXCHAR . |
| 157 | en_US.ISO-8859-1 THOUSEP , |
| 158 | en_US.ISO-8859-1 YESEXPR ^[yY].* |
| 159 | en_US.ISO-8859-1 NOEXPR ^[nN].* |
| 160 | de_DE.ISO-8859-1 ABDAY_1 So |
| 161 | de_DE.ISO-8859-1 ABDAY_2 Mo |
| 162 | de_DE.ISO-8859-1 ABDAY_3 Di |
| 163 | de_DE.ISO-8859-1 ABDAY_4 Mi |
| 164 | de_DE.ISO-8859-1 ABDAY_5 Do |
| 165 | de_DE.ISO-8859-1 ABDAY_6 Fr |
| 166 | de_DE.ISO-8859-1 ABDAY_7 Sa |
| 167 | de_DE.ISO-8859-1 DAY_1 Sonntag |
| 168 | de_DE.ISO-8859-1 DAY_2 Montag |
| 169 | de_DE.ISO-8859-1 DAY_3 Dienstag |
| 170 | de_DE.ISO-8859-1 DAY_4 Mittwoch |
| 171 | de_DE.ISO-8859-1 DAY_5 Donnerstag |
| 172 | de_DE.ISO-8859-1 DAY_6 Freitag |
| 173 | de_DE.ISO-8859-1 DAY_7 Samstag |
| 174 | de_DE.ISO-8859-1 ABMON_1 Jan |
| 175 | de_DE.ISO-8859-1 ABMON_2 Feb |
| 176 | de_DE.ISO-8859-1 ABMON_3 Mär |
| 177 | de_DE.ISO-8859-1 ABMON_4 Apr |
| 178 | de_DE.ISO-8859-1 ABMON_5 Mai |
| 179 | de_DE.ISO-8859-1 ABMON_6 Jun |
| 180 | de_DE.ISO-8859-1 ABMON_7 Jul |
| 181 | de_DE.ISO-8859-1 ABMON_8 Aug |
| 182 | de_DE.ISO-8859-1 ABMON_9 Sep |
| 183 | de_DE.ISO-8859-1 ABMON_10 Okt |
| 184 | de_DE.ISO-8859-1 ABMON_11 Nov |
| 185 | de_DE.ISO-8859-1 ABMON_12 Dez |
| 186 | de_DE.ISO-8859-1 MON_1 Januar |
| 187 | de_DE.ISO-8859-1 MON_2 Februar |
| 188 | de_DE.ISO-8859-1 MON_3 März |
| 189 | de_DE.ISO-8859-1 MON_4 April |
| 190 | de_DE.ISO-8859-1 MON_5 Mai |
| 191 | de_DE.ISO-8859-1 MON_6 Juni |
| 192 | de_DE.ISO-8859-1 MON_7 Juli |
| 193 | de_DE.ISO-8859-1 MON_8 August |
| 194 | de_DE.ISO-8859-1 MON_9 September |
| 195 | de_DE.ISO-8859-1 MON_10 Oktober |
| 196 | de_DE.ISO-8859-1 MON_11 November |
| 197 | de_DE.ISO-8859-1 MON_12 Dezember |
| 198 | de_DE.ISO-8859-1 D_T_FMT "%a %d %b %Y %T %Z" |
| 199 | de_DE.ISO-8859-1 D_FMT "%d.%m.%Y" |
| 200 | de_DE.ISO-8859-1 T_FMT "%T" |
| 201 | de_DE.ISO-8859-1 RADIXCHAR , |
| 202 | de_DE.ISO-8859-1 THOUSEP . |
| 203 | de_DE.ISO-8859-1 YESEXPR ^[jJyY].* |
| 204 | de_DE.ISO-8859-1 NOEXPR ^[nN].* |
| 205 | de_DE.UTF-8 ABDAY_1 So |
| 206 | de_DE.UTF-8 ABDAY_2 Mo |
| 207 | de_DE.UTF-8 ABDAY_3 Di |
| 208 | de_DE.UTF-8 ABDAY_4 Mi |
| 209 | de_DE.UTF-8 ABDAY_5 Do |
| 210 | de_DE.UTF-8 ABDAY_6 Fr |
| 211 | de_DE.UTF-8 ABDAY_7 Sa |
| 212 | de_DE.UTF-8 DAY_1 Sonntag |
| 213 | de_DE.UTF-8 DAY_2 Montag |
| 214 | de_DE.UTF-8 DAY_3 Dienstag |
| 215 | de_DE.UTF-8 DAY_4 Mittwoch |
| 216 | de_DE.UTF-8 DAY_5 Donnerstag |
| 217 | de_DE.UTF-8 DAY_6 Freitag |
| 218 | de_DE.UTF-8 DAY_7 Samstag |
| 219 | de_DE.UTF-8 ABMON_1 Jan |
| 220 | de_DE.UTF-8 ABMON_2 Feb |
| 221 | de_DE.UTF-8 ABMON_3 Mär |
| 222 | de_DE.UTF-8 ABMON_4 Apr |
| 223 | de_DE.UTF-8 ABMON_5 Mai |
| 224 | de_DE.UTF-8 ABMON_6 Jun |
| 225 | de_DE.UTF-8 ABMON_7 Jul |
| 226 | de_DE.UTF-8 ABMON_8 Aug |
| 227 | de_DE.UTF-8 ABMON_9 Sep |
| 228 | de_DE.UTF-8 ABMON_10 Okt |
| 229 | de_DE.UTF-8 ABMON_11 Nov |
| 230 | de_DE.UTF-8 ABMON_12 Dez |
| 231 | de_DE.UTF-8 MON_1 Januar |
| 232 | de_DE.UTF-8 MON_2 Februar |
| 233 | de_DE.UTF-8 MON_3 März |
| 234 | de_DE.UTF-8 MON_4 April |
| 235 | de_DE.UTF-8 MON_5 Mai |
| 236 | de_DE.UTF-8 MON_6 Juni |
| 237 | de_DE.UTF-8 MON_7 Juli |
| 238 | de_DE.UTF-8 MON_8 August |
| 239 | de_DE.UTF-8 MON_9 September |
| 240 | de_DE.UTF-8 MON_10 Oktober |
| 241 | de_DE.UTF-8 MON_11 November |
| 242 | de_DE.UTF-8 MON_12 Dezember |
| 243 | de_DE.UTF-8 D_T_FMT "%a %d %b %Y %T %Z" |
| 244 | de_DE.UTF-8 D_FMT "%d.%m.%Y" |
| 245 | de_DE.UTF-8 T_FMT "%T" |
| 246 | de_DE.UTF-8 RADIXCHAR , |
| 247 | de_DE.UTF-8 THOUSEP . |
| 248 | de_DE.UTF-8 YESEXPR ^[jJyY].* |
| 249 | de_DE.UTF-8 NOEXPR ^[nN].* |
| 250 | fr_FR.ISO-8859-1 ABDAY_1 dim. |
| 251 | fr_FR.ISO-8859-1 ABDAY_2 lun. |
| 252 | fr_FR.ISO-8859-1 ABDAY_3 mar. |
| 253 | fr_FR.ISO-8859-1 ABDAY_4 mer. |
| 254 | fr_FR.ISO-8859-1 ABDAY_5 jeu. |
| 255 | fr_FR.ISO-8859-1 ABDAY_6 ven. |
| 256 | fr_FR.ISO-8859-1 ABDAY_7 sam. |
| 257 | fr_FR.ISO-8859-1 DAY_1 dimanche |
| 258 | fr_FR.ISO-8859-1 DAY_2 lundi |
| 259 | fr_FR.ISO-8859-1 DAY_3 mardi |
| 260 | fr_FR.ISO-8859-1 DAY_4 mercredi |
| 261 | fr_FR.ISO-8859-1 DAY_5 jeudi |
| 262 | fr_FR.ISO-8859-1 DAY_6 vendredi |
| 263 | fr_FR.ISO-8859-1 DAY_7 samedi |
| 264 | fr_FR.ISO-8859-1 ABMON_1 janv. |
| 265 | fr_FR.ISO-8859-1 ABMON_2 févr. |
| 266 | fr_FR.ISO-8859-1 ABMON_3 mars |
| 267 | fr_FR.ISO-8859-1 ABMON_4 avril |
| 268 | fr_FR.ISO-8859-1 ABMON_5 mai |
| 269 | fr_FR.ISO-8859-1 ABMON_6 juin |
| 270 | fr_FR.ISO-8859-1 ABMON_7 juil. |
| 271 | fr_FR.ISO-8859-1 ABMON_8 août |
| 272 | fr_FR.ISO-8859-1 ABMON_9 sept. |
| 273 | fr_FR.ISO-8859-1 ABMON_10 oct. |
| 274 | fr_FR.ISO-8859-1 ABMON_11 nov. |
| 275 | fr_FR.ISO-8859-1 ABMON_12 déc. |
| 276 | fr_FR.ISO-8859-1 MON_1 janvier |
| 277 | fr_FR.ISO-8859-1 MON_2 février |
| 278 | fr_FR.ISO-8859-1 MON_3 mars |
| 279 | fr_FR.ISO-8859-1 MON_4 avril |
| 280 | fr_FR.ISO-8859-1 MON_5 mai |
| 281 | fr_FR.ISO-8859-1 MON_6 juin |
| 282 | fr_FR.ISO-8859-1 MON_7 juillet |
| 283 | fr_FR.ISO-8859-1 MON_8 août |
| 284 | fr_FR.ISO-8859-1 MON_9 septembre |
| 285 | fr_FR.ISO-8859-1 MON_10 octobre |
| 286 | fr_FR.ISO-8859-1 MON_11 novembre |
| 287 | fr_FR.ISO-8859-1 MON_12 décembre |
| 288 | fr_FR.ISO-8859-1 D_T_FMT "%a %d %b %Y %T %Z" |
| 289 | fr_FR.ISO-8859-1 D_FMT "%d/%m/%Y" |
| 290 | fr_FR.ISO-8859-1 T_FMT "%T" |
| 291 | fr_FR.ISO-8859-1 RADIXCHAR , |
| 292 | fr_FR.ISO-8859-1 THOUSEP " " |
| 293 | fr_FR.ISO-8859-1 YESEXPR ^[oOyY].* |
| 294 | fr_FR.ISO-8859-1 NOEXPR ^[nN].* |
| 295 | ja_JP.EUC-JP ABDAY_1 Æü |
| 296 | ja_JP.EUC-JP ABDAY_2 ·î |
| 297 | ja_JP.EUC-JP ABDAY_3 ²Ð |
| 298 | ja_JP.EUC-JP ABDAY_4 ¿å |
| 299 | ja_JP.EUC-JP ABDAY_5 ÌÚ |
| 300 | ja_JP.EUC-JP ABDAY_6 ¶â |
| 301 | ja_JP.EUC-JP ABDAY_7 ÅÚ |
| 302 | ja_JP.EUC-JP DAY_1 ÆüÍËÆü |
| 303 | ja_JP.EUC-JP DAY_2 ·îÍËÆü |
| 304 | ja_JP.EUC-JP DAY_3 ²ÐÍËÆü |
| 305 | ja_JP.EUC-JP DAY_4 ¿åÍËÆü |
| 306 | ja_JP.EUC-JP DAY_5 ÌÚÍËÆü |
| 307 | ja_JP.EUC-JP DAY_6 ¶âÍËÆü |
| 308 | ja_JP.EUC-JP DAY_7 ÅÚÍËÆü |
| 309 | ja_JP.EUC-JP ABMON_1 " 1·î" |
| 310 | ja_JP.EUC-JP ABMON_2 " 2·î" |
| 311 | ja_JP.EUC-JP ABMON_3 " 3·î" |
| 312 | ja_JP.EUC-JP ABMON_4 " 4·î" |
| 313 | ja_JP.EUC-JP ABMON_5 " 5·î" |
| 314 | ja_JP.EUC-JP ABMON_6 " 6·î" |
| 315 | ja_JP.EUC-JP ABMON_7 " 7·î" |
| 316 | ja_JP.EUC-JP ABMON_8 " 8·î" |
| 317 | ja_JP.EUC-JP ABMON_9 " 9·î" |
| 318 | ja_JP.EUC-JP ABMON_10 "10·î" |
| 319 | ja_JP.EUC-JP ABMON_11 "11·î" |
| 320 | ja_JP.EUC-JP ABMON_12 "12·î" |
| 321 | ja_JP.EUC-JP MON_1 "1·î" |
| 322 | ja_JP.EUC-JP MON_2 "2·î" |
| 323 | ja_JP.EUC-JP MON_3 "3·î" |
| 324 | ja_JP.EUC-JP MON_4 "4·î" |
| 325 | ja_JP.EUC-JP MON_5 "5·î" |
| 326 | ja_JP.EUC-JP MON_6 "6·î" |
| 327 | ja_JP.EUC-JP MON_7 "7·î" |
| 328 | ja_JP.EUC-JP MON_8 "8·î" |
| 329 | ja_JP.EUC-JP MON_9 "9·î" |
| 330 | ja_JP.EUC-JP MON_10 "10·î" |
| 331 | ja_JP.EUC-JP MON_11 "11·î" |
| 332 | ja_JP.EUC-JP MON_12 "12·î" |
| 333 | ja_JP.EUC-JP T_FMT_AMPM "%p%I»þ%Mʬ%SÉÃ" |
| 334 | ja_JP.EUC-JP ERA_D_FMT "%EY%m·î%dÆü" |
| 335 | ja_JP.EUC-JP ERA_D_T_FMT "%EY%m·î%dÆü %H»þ%Mʬ%SÉÃ" |
| 336 | ja_JP.EUC-JP RADIXCHAR . |
| 337 | ja_JP.EUC-JP THOUSEP , |
| 338 | ja_JP.EUC-JP YESEXPR ^([yY£ù£Ù]|¤Ï¤¤|¥Ï¥¤) |
| 339 | ja_JP.EUC-JP NOEXPR ^([nN£î£Î]|¤¤¤¤¤¨|¥¤¥¤¥¨) |
| 340 | # Is CRNCYSTR supposed to be the national or international sign? |
| 341 | # ja_JP.EUC-JP CRNCYSTR JPY |
| 342 | ja_JP.EUC-JP CODESET EUC-JP |
| 343 | EOF |
| 344 | ${tst_langinfo_before_env} \ |
| 345 | ${run_program_env} \ |
| 346 | LC_ALL=tt_TT ${tst_langinfo_after_env} |
| 347 | |
| 348 | exit $? |