Update.
[glibc.git] / localedata / tst-fmon.data
blobdb0e3f7abf070b381d0cf2dd16ed8701aa7717e8
1 # Test data for test-strfmon, which checks it's implementation in glibc
2 # Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4 # Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
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 # Library General Public License for more details.
16 # You should have received a copy of the GNU Library General Public
17 # License along with the GNU C Library; see the file COPYING.LIB.  If
18 # not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # The format of this file is pretty simple: Each line contains a test
22 # for strfmon.  Fields are separated by TABs.  Lines that start with a
23 # '#' are comments and are ignored.
25 # Field Description
26 # #1    locale which is to be checked
27 # #2    format string which is fed into strfmon
28 # #3    double value that is used for formatting
29 # #4    the expected result (may contain trailing spaces!)
31 # First the implementation without any locale-dependent data
32 # - no currency symbol is printed, formatting is somewhat standard
33 C                       %n      1.23            1.23
34 C                       %n      -1.23           -1.23
35 C                       %n      0               0.00
36 C                       %%      0               %
37 C                       *%n*    1.23            *1.23*
38 C                       %9n     1.23                 1.23
39 C                       %9n     -1.23               -1.23
40 C                       %#9n    1.23                     1.23
41 C                       %#9n    -1.23           -        1.23
42 C                       %=*#9n  1.23             ********1.23
43 C                       %=*#9n  -1.23           -********1.23
45 # check both the german locale and strfmon with that data
47 de_DE.ISO-8859-1        %n      1.23            1,23 DM
48 de_DE.ISO-8859-1        %n      -1.23           -1,23 DM
49 de_DE.ISO-8859-1        %n      1234.56         1.234,56 DM
50 de_DE.ISO-8859-1        %11n    123.45            123,45 DM
51 de_DE.ISO-8859-1        %11n    -123.45          -123,45 DM
52 de_DE.ISO-8859-1        %11n    3456.781        3.456,78 DM
53 de_DE.ISO-8859-1        %^n     1234.56         1234,56 DM
54 de_DE.ISO-8859-1        %+n     1234.56         1.234,56 DM
55 de_DE.ISO-8859-1        %+n     -1234.56        -1.234,56 DM
56 de_DE.ISO-8859-1        %(n     1234.56         1.234,56 DM
57 de_DE.ISO-8859-1        %(n     -1234.56        (1.234,56 DM)
58 de_DE.ISO-8859-1        %^n     1234.56         1234,56 DM
59 de_DE.ISO-8859-1        %i      1.23            1,23 DEM
60 de_DE.ISO-8859-1        %i      -1.23           -1,23 DEM
61 de_DE.ISO-8859-1        %i      1234.56         1.234,56 DEM
62 de_DE.ISO-8859-1        %^i     1234.56         1234,56 DEM
63 de_DE.ISO-8859-1        %+i     1234.56         1.234,56 DEM
64 de_DE.ISO-8859-1        %+i     -1234.56        -1.234,56 DEM
65 de_DE.ISO-8859-1        %(i     1234.56         1.234,56 DEM
66 de_DE.ISO-8859-1        %(i     -1234.56        (1.234,56 DEM)
67 de_DE.ISO-8859-1        %^i     1234.56         1234,56 DEM
68 de_DE.ISO-8859-1        %#5n    123.45              123,45 DM
69 de_DE.ISO-8859-1        %#5n    -123.45         -   123,45 DM
70 de_DE.ISO-8859-1        %#5n    3456.781          3.456,78 DM
71 de_DE.ISO-8859-1        %=*#5n  123.45           ***123,45 DM
72 de_DE.ISO-8859-1        %=*#5n  -123.45         -***123,45 DM
73 de_DE.ISO-8859-1        %=*#5n  3456.781         *3.456,78 DM
74 de_DE.ISO-8859-1        %=0#5n  123.45           000123,45 DM
75 de_DE.ISO-8859-1        %=0#5n  -123.45         -000123,45 DM
76 de_DE.ISO-8859-1        %=0#5n  3456.781         03.456,78 DM
77 de_DE.ISO-8859-1        %^#5n   123.45             123,45 DM
78 de_DE.ISO-8859-1        %^#5n   -123.45         -  123,45 DM
79 de_DE.ISO-8859-1        %^#5n   3456.781          3456,78 DM
80 de_DE.ISO-8859-1        %^#5.0n 123.45             123 DM
81 de_DE.ISO-8859-1        %^#5.0n -123.45         -  123 DM
82 de_DE.ISO-8859-1        %^#5.0n 3456.781          3457 DM
83 de_DE.ISO-8859-1        %^#5.4n 123.45             123,4500 DM
84 de_DE.ISO-8859-1        %^#5.4n -123.45         -  123,4500 DM
85 de_DE.ISO-8859-1        %^#5.4n 3456.781          3456,7810 DM
86 de_DE.ISO-8859-1        %(#5n   123.45              123,45 DM
87 de_DE.ISO-8859-1        %(#5n   -123.45         (   123,45 DM)
88 de_DE.ISO-8859-1        %(#5n   3456.781          3.456,78 DM
89 de_DE.ISO-8859-1        %!(#5n  123.45              123,45
90 de_DE.ISO-8859-1        %!(#5n  -123.45         (   123,45)
91 de_DE.ISO-8859-1        %!(#5n  3456.781          3.456,78
93 # check both the en_US locale and strfmon with that data
94 # a lot of this checks are created from a strfmon(3) man-page.
96 en_US.ISO-8859-1        %n      123.45          $123.45
97 en_US.ISO-8859-1        %n      -123.45         -$123.45
98 en_US.ISO-8859-1        %n      3456.781        $3,456.78
99 en_US.ISO-8859-1        %i      123.45          USD 123.45
100 en_US.ISO-8859-1        %i      -123.45         -USD 123.45
101 en_US.ISO-8859-1        %i      3456.781        USD 3,456.78
102 en_US.ISO-8859-1        %11n    123.45              $123.45
103 en_US.ISO-8859-1        %11n    -123.45            -$123.45
104 en_US.ISO-8859-1        %11n    3456.781          $3,456.78
105 en_US.ISO-8859-1        %=*#5n  123.45           $***123.45
106 en_US.ISO-8859-1        %=*#5n  -123.45         -$***123.45
107 en_US.ISO-8859-1        %=*#5n  3456.781         $*3,456.78
108 en_US.ISO-8859-1        %=0#5n  123.45           $000123.45
109 en_US.ISO-8859-1        %=0#5n  -123.45         -$000123.45
110 en_US.ISO-8859-1        %=0#5n  3456.781         $03,456.78
111 en_US.ISO-8859-1        %^#5n   123.45           $  123.45
112 en_US.ISO-8859-1        %^#5n   -123.45         -$  123.45
113 en_US.ISO-8859-1        %^#5n   3456.781         $ 3456.78
114 en_US.ISO-8859-1        %^#5.0n 123.45           $  123
115 en_US.ISO-8859-1        %^#5.0n -123.45         -$  123
116 en_US.ISO-8859-1        %^#5.0n 3456.781         $ 3457
117 en_US.ISO-8859-1        %^#5.4n 123.45           $  123.4500
118 en_US.ISO-8859-1        %^#5.4n -123.45         -$  123.4500
119 en_US.ISO-8859-1        %^#5.4n 3456.781         $ 3456.7810
120 en_US.ISO-8859-1        %(#5n   123.45           $   123.45
121 en_US.ISO-8859-1        %(#5n   -123.45         ($   123.45)
122 en_US.ISO-8859-1        %(#5n   3456.781         $ 3,456.78
123 en_US.ISO-8859-1        %!(#5n  123.45              123.45
124 en_US.ISO-8859-1        %!(#5n  -123.45         (   123.45)
125 en_US.ISO-8859-1        %!(#5n  3456.781          3,456.78
126 en_US.ISO-8859-1        %#5n    123.45           $   123.45
127 en_US.ISO-8859-1        %#5n    -123.45         -$   123.45
128 en_US.ISO-8859-1        %#5n    3456.781         $ 3,456.78
130 # check all cs_precedes/sign_posn/sep_by_space combinations using
131 # special test locales.  The six characters after the "_" indicate
132 # these three values for positive and then negative quantities.
134 tstfmon_n01y12          %n      123.45          123.45 $
135 tstfmon_n01y12          %n      -123.45         - $123.45
136 tstfmon_n01y12          %11n    123.45             123.45 $
137 tstfmon_n01y12          %11n    -123.45           - $123.45
138 tstfmon_n01y12          %^=*#5n 123.45             **123.45 $
139 tstfmon_n01y12          %^=*#5n -123.45         - $**123.45
141 tstfmon_n02n40          %n      123.45          123.45$
142 tstfmon_n02n40          %n      -123.45         123.45$-
143 tstfmon_n02n40          %11n    123.45              123.45$
144 tstfmon_n02n40          %11n    -123.45            123.45$-
145 tstfmon_n02n40          %^=*#5n 123.45          **123.45$
146 tstfmon_n02n40          %^=*#5n -123.45         **123.45$-
148 tstfmon_n10y31          %n      123.45          +123.45$
149 tstfmon_n10y31          %n      -123.45         -$ 123.45
150 tstfmon_n10y31          %11n    123.45             +123.45$
151 tstfmon_n10y31          %11n    -123.45           -$ 123.45
152 tstfmon_n10y31          %^=*#5n 123.45            +**123.45$
153 tstfmon_n10y31          %^=*#5n -123.45         -$ **123.45
155 tstfmon_n11y41          %n      123.45          +123.45 $
156 tstfmon_n11y41          %n      -123.45         $- 123.45
157 tstfmon_n11y41          %11n    123.45            +123.45 $
158 tstfmon_n11y41          %11n    -123.45           $- 123.45
159 tstfmon_n11y41          %^=*#5n 123.45            +**123.45 $
160 tstfmon_n11y41          %^=*#5n -123.45         $- **123.45
162 tstfmon_n12y11          %n      123.45          +123.45$
163 tstfmon_n12y11          %n      -123.45         -$ 123.45
164 tstfmon_n12y11          %11n    123.45             +123.45$
165 tstfmon_n12y11          %11n    -123.45           -$ 123.45
166 tstfmon_n12y11          %^=*#5n 123.45            +**123.45$
167 tstfmon_n12y11          %^=*#5n -123.45         -$ **123.45
169 tstfmon_n20n32          %n      123.45          123.45$+
170 tstfmon_n20n32          %n      -123.45         123.45- $
171 tstfmon_n20n32          %11n    123.45             123.45$+
172 tstfmon_n20n32          %11n    -123.45           123.45- $
173 tstfmon_n20n32          %^=*#5n 123.45          **123.45$+
174 tstfmon_n20n32          %^=*#5n -123.45         **123.45- $
176 tstfmon_n30y20          %n      123.45          123.45+$
177 tstfmon_n30y20          %n      -123.45         $123.45-
178 tstfmon_n30y20          %11n    123.45             123.45+$
179 tstfmon_n30y20          %11n    -123.45            $123.45-
180 tstfmon_n30y20          %^=*#5n 123.45           **123.45+$
181 tstfmon_n30y20          %^=*#5n -123.45         $**123.45-
183 tstfmon_n41n00          %n      123.45          123.45 $+
184 tstfmon_n41n00          %n      -123.45         (123.45$)
185 tstfmon_n41n00          %11n    123.45            123.45 $+
186 tstfmon_n41n00          %11n    -123.45           (123.45$)
187 tstfmon_n41n00          %^=*#5n 123.45           **123.45 $+
188 tstfmon_n41n00          %^=*#5n -123.45         (**123.45$)
190 tstfmon_y01y10          %n      123.45          $ 123.45
191 tstfmon_y01y10          %n      -123.45         -$123.45
192 tstfmon_y01y10          %11n    123.45             $ 123.45
193 tstfmon_y01y10          %11n    -123.45            -$123.45
194 tstfmon_y01y10          %^=*#5n 123.45          $ **123.45
195 tstfmon_y01y10          %^=*#5n -123.45         -$**123.45
197 tstfmon_y02n22          %n      123.45          $123.45
198 tstfmon_y02n22          %n      -123.45         123.45$ O/D
199 tstfmon_y02n22          %12n    123.45               $123.45
200 tstfmon_y02n22          %12n    -123.45          123.45$ O/D
201 tstfmon_y02n22          %^=*#5n 123.45          $**123.45
202 tstfmon_y02n22          %^=*#5n -123.45          **123.45$ O/D
204 tstfmon_y22n42          %n      123.45          $123.45+
205 tstfmon_y22n42          %n      -123.45         123.45$ -
206 tstfmon_y22n42          %11n    123.45             $123.45+
207 tstfmon_y22n42          %11n    -123.45           123.45$ -
208 tstfmon_y22n42          %^=*#5n 123.45          $**123.45+
209 tstfmon_y22n42          %^=*#5n -123.45          **123.45$ -
211 tstfmon_y30y21          %n      123.45          +$123.45
212 tstfmon_y30y21          %n      -123.45         $ 123.45-
213 tstfmon_y30y21          %11n    123.45             +$123.45
214 tstfmon_y30y21          %11n    -123.45           $ 123.45-
215 tstfmon_y30y21          %^=*#5n 123.45          +$**123.45
216 tstfmon_y30y21          %^=*#5n -123.45         $ **123.45-
218 tstfmon_y32n31          %n      123.45          + $123.45
219 tstfmon_y32n31          %n      -123.45         123.45 -$
220 tstfmon_y32n31          %11n    123.45            + $123.45
221 tstfmon_y32n31          %11n    -123.45           123.45 -$
222 tstfmon_y32n31          %^=*#5n 123.45          + $**123.45
223 tstfmon_y32n31          %^=*#5n -123.45            **123.45 -$
225 tstfmon_y40y00          %n      123.45          $+123.45
226 tstfmon_y40y00          %n      -123.45         ($123.45)
227 tstfmon_y40y00          %11n    123.45             $+123.45
228 tstfmon_y40y00          %11n    -123.45           ($123.45)
229 tstfmon_y40y00          %^=*#5n 123.45          $+**123.45
230 tstfmon_y40y00          %^=*#5n -123.45         ($**123.45)
232 tstfmon_y42n21          %n      123.45          $ +123.45
233 tstfmon_y42n21          %n      -123.45         123.45 $-
234 tstfmon_y42n21          %11n    123.45            $ +123.45
235 tstfmon_y42n21          %11n    -123.45           123.45 $-
236 tstfmon_y42n21          %^=*#5n 123.45          $ +**123.45
237 tstfmon_y42n21          %^=*#5n -123.45            **123.45 $-