about summary refs log tree commit diff
path: root/localedata/tst-fmon.data
blob: c5b5813d18eed0b6539085332de4a94a48f860d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# Test data for test-strfmon, which checks it's implementation in glibc
# Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB.  If
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# The format of this file is pretty simple: Each line contains a test
# for strfmon.  Fields are separated by TABs.  Lines that start with a
# '#' are comments and are ignored.
#
# Field Description
# #1    locale which is to be checked
# #2    format string which is fed into strfmon
# #3    double value that is used for formatting
# #4    the expected result (may contain trailing spaces!)
#
# First the implementation without any locale-dependent data
# - no currency symbol is printed, formatting is somewhat standard
C			%n	1.23		1.23
C			%n	-1.23		-1.23
C			%n	0		0.00
C			%%	0		%
C			*%n*	1.23		*1.23*
C			%9n	1.23		     1.23
C			%9n	-1.23		    -1.23
C			%#9n	1.23		         1.23
C			%#9n	-1.23		-        1.23
C			%=*#9n	1.23		 ********1.23
C			%=*#9n	-1.23		-********1.23
#
# check both the german locale and strfmon with that data
#
de_DE.ISO-8859-1	%n	1.23		1,23 DM
de_DE.ISO-8859-1	%n	-1.23		-1,23 DM
de_DE.ISO-8859-1	%n	1234.56		1.234,56 DM
de_DE.ISO-8859-1	%11n	123.45		  123,45 DM
de_DE.ISO-8859-1	%11n	-123.45		 -123,45 DM
de_DE.ISO-8859-1	%11n	3456.781	3.456,78 DM
de_DE.ISO-8859-1	%^n	1234.56		1234,56 DM
de_DE.ISO-8859-1	%+n	1234.56		1.234,56 DM
de_DE.ISO-8859-1	%+n	-1234.56	-1.234,56 DM
de_DE.ISO-8859-1	%(n	1234.56		1.234,56 DM
de_DE.ISO-8859-1	%(n	-1234.56	(1.234,56 DM)
de_DE.ISO-8859-1	%^n	1234.56		1234,56 DM
de_DE.ISO-8859-1	%i	1.23		1,23 DEM 
de_DE.ISO-8859-1	%i	-1.23		-1,23 DEM 
de_DE.ISO-8859-1	%i	1234.56		1.234,56 DEM 
de_DE.ISO-8859-1	%^i	1234.56		1234,56 DEM 
de_DE.ISO-8859-1	%+i	1234.56		1.234,56 DEM 
de_DE.ISO-8859-1	%+i	-1234.56	-1.234,56 DEM 
de_DE.ISO-8859-1	%(i	1234.56		1.234,56 DEM 
de_DE.ISO-8859-1	%(i	-1234.56	(1.234,56 DEM )
de_DE.ISO-8859-1	%^i	1234.56		1234,56 DEM 
de_DE.ISO-8859-1	%#5n	123.45		    123,45 DM
de_DE.ISO-8859-1	%#5n	-123.45		-   123,45 DM
de_DE.ISO-8859-1	%#5n	3456.781	  3.456,78 DM
de_DE.ISO-8859-1	%=*#5n	123.45		 ***123,45 DM
de_DE.ISO-8859-1	%=*#5n	-123.45		-***123,45 DM
de_DE.ISO-8859-1	%=*#5n	3456.781	 *3.456,78 DM
de_DE.ISO-8859-1	%=0#5n	123.45		 000123,45 DM
de_DE.ISO-8859-1	%=0#5n	-123.45		-000123,45 DM
de_DE.ISO-8859-1	%=0#5n	3456.781	 03.456,78 DM
de_DE.ISO-8859-1	%^#5n	123.45		   123,45 DM
de_DE.ISO-8859-1	%^#5n	-123.45		-  123,45 DM
de_DE.ISO-8859-1	%^#5n	3456.781	  3456,78 DM
de_DE.ISO-8859-1	%^#5.0n	123.45		   123 DM
de_DE.ISO-8859-1	%^#5.0n	-123.45		-  123 DM
de_DE.ISO-8859-1	%^#5.0n	3456.781	  3457 DM
de_DE.ISO-8859-1	%^#5.4n	123.45		   123,4500 DM
de_DE.ISO-8859-1	%^#5.4n	-123.45		-  123,4500 DM
de_DE.ISO-8859-1	%^#5.4n	3456.781	  3456,7810 DM
de_DE.ISO-8859-1	%(#5n	123.45		    123,45 DM
de_DE.ISO-8859-1	%(#5n	-123.45		(   123,45 DM)
de_DE.ISO-8859-1	%(#5n	3456.781	  3.456,78 DM
de_DE.ISO-8859-1	%!(#5n	123.45		    123,45
de_DE.ISO-8859-1	%!(#5n	-123.45		(   123,45)
de_DE.ISO-8859-1	%!(#5n	3456.781	  3.456,78
#
# check both the en_US locale and strfmon with that data
# a lot of this checks are created from a strfmon(3) man-page.
#
en_US.ISO-8859-1	%n	123.45		$123.45
en_US.ISO-8859-1	%n	-123.45		-$123.45
en_US.ISO-8859-1	%n	3456.781	$3,456.78
en_US.ISO-8859-1	%i	123.45		USD 123.45
en_US.ISO-8859-1	%i	-123.45		-USD 123.45
en_US.ISO-8859-1	%i	3456.781	USD 3,456.78
en_US.ISO-8859-1	%11n	123.45		    $123.45
en_US.ISO-8859-1	%11n	-123.45		   -$123.45
en_US.ISO-8859-1	%11n	3456.781	  $3,456.78
en_US.ISO-8859-1	%=*#5n	123.45		 $***123.45
en_US.ISO-8859-1	%=*#5n	-123.45		-$***123.45
en_US.ISO-8859-1	%=*#5n	3456.781	 $*3,456.78
en_US.ISO-8859-1	%=0#5n	123.45		 $000123.45
en_US.ISO-8859-1	%=0#5n	-123.45		-$000123.45
en_US.ISO-8859-1	%=0#5n	3456.781	 $03,456.78
en_US.ISO-8859-1	%^#5n	123.45		 $  123.45
en_US.ISO-8859-1	%^#5n	-123.45		-$  123.45
en_US.ISO-8859-1	%^#5n	3456.781	 $ 3456.78
en_US.ISO-8859-1	%^#5.0n	123.45		 $  123
en_US.ISO-8859-1	%^#5.0n	-123.45		-$  123
en_US.ISO-8859-1	%^#5.0n	3456.781	 $ 3457
en_US.ISO-8859-1	%^#5.4n	123.45		 $  123.4500
en_US.ISO-8859-1	%^#5.4n	-123.45		-$  123.4500
en_US.ISO-8859-1	%^#5.4n	3456.781	 $ 3456.7810
en_US.ISO-8859-1	%(#5n	123.45		 $   123.45
en_US.ISO-8859-1	%(#5n	-123.45		($   123.45)
en_US.ISO-8859-1	%(#5n	3456.781	 $ 3,456.78
en_US.ISO-8859-1	%!(#5n	123.45		    123.45
en_US.ISO-8859-1	%!(#5n	-123.45		(   123.45)
en_US.ISO-8859-1	%!(#5n	3456.781	  3,456.78
en_US.ISO-8859-1	%#5n	123.45		 $   123.45
en_US.ISO-8859-1	%#5n	-123.45		-$   123.45
en_US.ISO-8859-1	%#5n	3456.781	 $ 3,456.78
#
# check all cs_precedes/sign_posn/sep_by_space combinations using
# special test locales.  The six characters after the "_" indicate
# these three values for positive and then negative quantities.
#
tstfmon_n01y12		%n	123.45		123.45 $
tstfmon_n01y12		%n	-123.45		- $123.45
tstfmon_n01y12		%11n	123.45		   123.45 $
tstfmon_n01y12		%11n	-123.45		  - $123.45
tstfmon_n01y12		%^=*#5n	123.45		   **123.45 $
tstfmon_n01y12		%^=*#5n	-123.45		- $**123.45
#
tstfmon_n02n40		%n	123.45		123.45$
tstfmon_n02n40		%n	-123.45		123.45$-
tstfmon_n02n40		%11n	123.45		    123.45$
tstfmon_n02n40		%11n	-123.45		   123.45$-
tstfmon_n02n40		%^=*#5n	123.45		**123.45$
tstfmon_n02n40		%^=*#5n	-123.45		**123.45$-
#
tstfmon_n10y31		%n	123.45		+123.45$
tstfmon_n10y31		%n	-123.45		-$ 123.45
tstfmon_n10y31		%11n	123.45		   +123.45$
tstfmon_n10y31		%11n	-123.45		  -$ 123.45
tstfmon_n10y31		%^=*#5n	123.45		  +**123.45$
tstfmon_n10y31		%^=*#5n	-123.45		-$ **123.45
#
tstfmon_n11y41		%n	123.45		+123.45 $
tstfmon_n11y41		%n	-123.45		$- 123.45
tstfmon_n11y41		%11n	123.45		  +123.45 $
tstfmon_n11y41		%11n	-123.45		  $- 123.45
tstfmon_n11y41		%^=*#5n	123.45		  +**123.45 $
tstfmon_n11y41		%^=*#5n	-123.45		$- **123.45
#
tstfmon_n12y11		%n	123.45		+123.45$
tstfmon_n12y11		%n	-123.45		-$ 123.45
tstfmon_n12y11		%11n	123.45		   +123.45$
tstfmon_n12y11		%11n	-123.45		  -$ 123.45
tstfmon_n12y11		%^=*#5n	123.45		  +**123.45$
tstfmon_n12y11		%^=*#5n	-123.45		-$ **123.45
#
tstfmon_n20n32		%n	123.45		123.45$+
tstfmon_n20n32		%n	-123.45		123.45- $
tstfmon_n20n32		%11n	123.45		   123.45$+
tstfmon_n20n32		%11n	-123.45		  123.45- $
tstfmon_n20n32		%^=*#5n	123.45		**123.45$+
tstfmon_n20n32		%^=*#5n	-123.45		**123.45- $
#
tstfmon_n30y20		%n	123.45		123.45+$
tstfmon_n30y20		%n	-123.45		$123.45-
tstfmon_n30y20		%11n	123.45		   123.45+$
tstfmon_n30y20		%11n	-123.45		   $123.45-
tstfmon_n30y20		%^=*#5n	123.45		 **123.45+$
tstfmon_n30y20		%^=*#5n	-123.45		$**123.45-
#
tstfmon_n41n00		%n	123.45		123.45 $+
tstfmon_n41n00		%n	-123.45		(123.45$)
tstfmon_n41n00		%11n	123.45		  123.45 $+
tstfmon_n41n00		%11n	-123.45		  (123.45$)
tstfmon_n41n00		%^=*#5n	123.45		 **123.45 $+
tstfmon_n41n00		%^=*#5n	-123.45		(**123.45$)
#
tstfmon_y01y10		%n	123.45		$ 123.45
tstfmon_y01y10		%n	-123.45		-$123.45
tstfmon_y01y10		%11n	123.45		   $ 123.45
tstfmon_y01y10		%11n	-123.45		   -$123.45
tstfmon_y01y10		%^=*#5n	123.45		$ **123.45
tstfmon_y01y10		%^=*#5n	-123.45		-$**123.45
#
tstfmon_y02n22		%n	123.45		$123.45
tstfmon_y02n22		%n	-123.45		123.45$ O/D
tstfmon_y02n22		%12n	123.45		     $123.45
tstfmon_y02n22		%12n	-123.45		 123.45$ O/D
tstfmon_y02n22		%^=*#5n	123.45		$**123.45
tstfmon_y02n22		%^=*#5n	-123.45		 **123.45$ O/D
#
tstfmon_y22n42		%n	123.45		$123.45+
tstfmon_y22n42		%n	-123.45		123.45$ -
tstfmon_y22n42		%11n	123.45		   $123.45+
tstfmon_y22n42		%11n	-123.45		  123.45$ -
tstfmon_y22n42		%^=*#5n	123.45		$**123.45+
tstfmon_y22n42		%^=*#5n	-123.45		 **123.45$ -
#
tstfmon_y30y21		%n	123.45		+$123.45
tstfmon_y30y21		%n	-123.45		$ 123.45-
tstfmon_y30y21		%11n	123.45		   +$123.45
tstfmon_y30y21		%11n	-123.45		  $ 123.45-
tstfmon_y30y21		%^=*#5n	123.45		+$**123.45
tstfmon_y30y21		%^=*#5n	-123.45		$ **123.45-
#
tstfmon_y32n31		%n	123.45		+ $123.45
tstfmon_y32n31		%n	-123.45		123.45 -$
tstfmon_y32n31		%11n	123.45		  + $123.45
tstfmon_y32n31		%11n	-123.45		  123.45 -$
tstfmon_y32n31		%^=*#5n	123.45		+ $**123.45
tstfmon_y32n31		%^=*#5n	-123.45		   **123.45 -$
#
tstfmon_y40y00		%n	123.45		$+123.45
tstfmon_y40y00		%n	-123.45		($123.45)
tstfmon_y40y00		%11n	123.45		   $+123.45
tstfmon_y40y00		%11n	-123.45		  ($123.45)
tstfmon_y40y00		%^=*#5n	123.45		$+**123.45
tstfmon_y40y00		%^=*#5n	-123.45		($**123.45)
#
tstfmon_y42n21		%n	123.45		$ +123.45
tstfmon_y42n21		%n	-123.45		123.45 $-
tstfmon_y42n21		%11n	123.45		  $ +123.45
tstfmon_y42n21		%11n	-123.45		  123.45 $-
tstfmon_y42n21		%^=*#5n	123.45		$ +**123.45
tstfmon_y42n21		%^=*#5n	-123.45		   **123.45 $-