]> git.ipfire.org Git - thirdparty/glibc.git/blame - localedata/tst-fmon.data
Update.
[thirdparty/glibc.git] / localedata / tst-fmon.data
CommitLineData
49891c10 1# Test data for test-strfmon, which checks it's implementation in glibc
dd17514c 2# Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
49891c10
UD
3# This file is part of the GNU C Library.
4# Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
5#
41bdb6e2 6
49891c10 7# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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
49891c10
UD
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
41bdb6e2
AJ
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.
49891c10
UD
21
22# The format of this file is pretty simple: Each line contains a test
8956ac9e 23# for strfmon. Fields are separated by TABs. Lines that start with a
49891c10
UD
24# '#' are comments and are ignored.
25#
22d5fbfe 26# Field Description
49891c10
UD
27# #1 locale which is to be checked
28# #2 format string which is fed into strfmon
29# #3 double value that is used for formatting
30# #4 the expected result (may contain trailing spaces!)
dd17514c
UD
31# This field might be enclosed with "" to make it easier to see
32# the white space
49891c10
UD
33#
34# First the implementation without any locale-dependent data
35# - no currency symbol is printed, formatting is somewhat standard
22d5fbfe 36C %n 1.23 1.23
49891c10 37C %n -1.23 -1.23
22d5fbfe 38C %n 0 0.00
49891c10 39C %% 0 %
22d5fbfe 40C *%n* 1.23 *1.23*
49891c10 41C %9n 1.23 1.23
9e9e0532
UD
42C %9n -1.23 -1.23
43C %#9n 1.23 1.23
44C %#9n -1.23 - 1.23
45C %=*#9n 1.23 ********1.23
46C %=*#9n -1.23 -********1.23
49891c10
UD
47#
48# check both the german locale and strfmon with that data
49#
90a77d0a
UD
50de_DE.ISO-8859-1 %n 1.23 1,23 EUR
51de_DE.ISO-8859-1 %n -1.23 -1,23 EUR
52de_DE.ISO-8859-1 %n 1234.56 1.234,56 EUR
53de_DE.ISO-8859-1 %12n 123.45 123,45 EUR
54de_DE.ISO-8859-1 %12n -123.45 -123,45 EUR
55de_DE.ISO-8859-1 %12n 3456.781 3.456,78 EUR
56de_DE.ISO-8859-1 %^n 1234.56 1234,56 EUR
57de_DE.ISO-8859-1 %+n 1234.56 1.234,56 EUR
58de_DE.ISO-8859-1 %+n -1234.56 -1.234,56 EUR
59de_DE.ISO-8859-1 %(n 1234.56 1.234,56 EUR
60de_DE.ISO-8859-1 %(n -1234.56 (1.234,56 EUR)
61de_DE.ISO-8859-1 %^n 1234.56 1234,56 EUR
62de_DE.ISO-8859-1 %i 1.23 1,23 EUR
63de_DE.ISO-8859-1 %i -1.23 -1,23 EUR
64de_DE.ISO-8859-1 %i 1234.56 1.234,56 EUR
65de_DE.ISO-8859-1 %^i 1234.56 1234,56 EUR
66de_DE.ISO-8859-1 %+i 1234.56 1.234,56 EUR
67de_DE.ISO-8859-1 %+i -1234.56 -1.234,56 EUR
68de_DE.ISO-8859-1 %(i 1234.56 1.234,56 EUR
69de_DE.ISO-8859-1 %(i -1234.56 (1.234,56 EUR)
70de_DE.ISO-8859-1 %^i 1234.56 1234,56 EUR
71de_DE.ISO-8859-1 %#5n 123.45 123,45 EUR
72de_DE.ISO-8859-1 %#5n -123.45 - 123,45 EUR
73de_DE.ISO-8859-1 %#5n 3456.781 3.456,78 EUR
74de_DE.ISO-8859-1 %=*#5n 123.45 ***123,45 EUR
75de_DE.ISO-8859-1 %=*#5n -123.45 -***123,45 EUR
76de_DE.ISO-8859-1 %=*#5n 3456.781 *3.456,78 EUR
77de_DE.ISO-8859-1 %=0#5n 123.45 000123,45 EUR
78de_DE.ISO-8859-1 %=0#5n -123.45 -000123,45 EUR
79de_DE.ISO-8859-1 %=0#5n 3456.781 03.456,78 EUR
80de_DE.ISO-8859-1 %^#5n 123.45 123,45 EUR
81de_DE.ISO-8859-1 %^#5n -123.45 - 123,45 EUR
82de_DE.ISO-8859-1 %^#5n 3456.781 3456,78 EUR
83de_DE.ISO-8859-1 %^#5.0n 123.45 123 EUR
84de_DE.ISO-8859-1 %^#5.0n -123.45 - 123 EUR
85de_DE.ISO-8859-1 %^#5.0n 3456.781 3457 EUR
86de_DE.ISO-8859-1 %^#5.4n 123.45 123,4500 EUR
87de_DE.ISO-8859-1 %^#5.4n -123.45 - 123,4500 EUR
88de_DE.ISO-8859-1 %^#5.4n 3456.781 3456,7810 EUR
89de_DE.ISO-8859-1 %(#5n 123.45 123,45 EUR
90de_DE.ISO-8859-1 %(#5n -123.45 ( 123,45 EUR)
91de_DE.ISO-8859-1 %(#5n 3456.781 3.456,78 EUR
9e9e0532 92de_DE.ISO-8859-1 %!(#5n 123.45 123,45
49891c10 93de_DE.ISO-8859-1 %!(#5n -123.45 ( 123,45)
9e9e0532 94de_DE.ISO-8859-1 %!(#5n 3456.781 3.456,78
49891c10
UD
95#
96# check both the en_US locale and strfmon with that data
97# a lot of this checks are created from a strfmon(3) man-page.
98#
22d5fbfe 99en_US.ISO-8859-1 %n 123.45 $123.45
49891c10 100en_US.ISO-8859-1 %n -123.45 -$123.45
22d5fbfe
UD
101en_US.ISO-8859-1 %n 3456.781 $3,456.78
102en_US.ISO-8859-1 %i 123.45 USD 123.45
49891c10 103en_US.ISO-8859-1 %i -123.45 -USD 123.45
22d5fbfe 104en_US.ISO-8859-1 %i 3456.781 USD 3,456.78
49891c10
UD
105en_US.ISO-8859-1 %11n 123.45 $123.45
106en_US.ISO-8859-1 %11n -123.45 -$123.45
107en_US.ISO-8859-1 %11n 3456.781 $3,456.78
108en_US.ISO-8859-1 %=*#5n 123.45 $***123.45
109en_US.ISO-8859-1 %=*#5n -123.45 -$***123.45
110en_US.ISO-8859-1 %=*#5n 3456.781 $*3,456.78
111en_US.ISO-8859-1 %=0#5n 123.45 $000123.45
112en_US.ISO-8859-1 %=0#5n -123.45 -$000123.45
113en_US.ISO-8859-1 %=0#5n 3456.781 $03,456.78
114en_US.ISO-8859-1 %^#5n 123.45 $ 123.45
115en_US.ISO-8859-1 %^#5n -123.45 -$ 123.45
116en_US.ISO-8859-1 %^#5n 3456.781 $ 3456.78
117en_US.ISO-8859-1 %^#5.0n 123.45 $ 123
118en_US.ISO-8859-1 %^#5.0n -123.45 -$ 123
119en_US.ISO-8859-1 %^#5.0n 3456.781 $ 3457
120en_US.ISO-8859-1 %^#5.4n 123.45 $ 123.4500
121en_US.ISO-8859-1 %^#5.4n -123.45 -$ 123.4500
122en_US.ISO-8859-1 %^#5.4n 3456.781 $ 3456.7810
9e9e0532 123en_US.ISO-8859-1 %(#5n 123.45 $ 123.45
49891c10 124en_US.ISO-8859-1 %(#5n -123.45 ($ 123.45)
9e9e0532
UD
125en_US.ISO-8859-1 %(#5n 3456.781 $ 3,456.78
126en_US.ISO-8859-1 %!(#5n 123.45 123.45
49891c10 127en_US.ISO-8859-1 %!(#5n -123.45 ( 123.45)
9e9e0532 128en_US.ISO-8859-1 %!(#5n 3456.781 3,456.78
49891c10
UD
129en_US.ISO-8859-1 %#5n 123.45 $ 123.45
130en_US.ISO-8859-1 %#5n -123.45 -$ 123.45
131en_US.ISO-8859-1 %#5n 3456.781 $ 3,456.78
8956ac9e
UD
132#
133# check all cs_precedes/sign_posn/sep_by_space combinations using
134# special test locales. The six characters after the "_" indicate
135# these three values for positive and then negative quantities.
136#
137tstfmon_n01y12 %n 123.45 123.45 $
138tstfmon_n01y12 %n -123.45 - $123.45
139tstfmon_n01y12 %11n 123.45 123.45 $
140tstfmon_n01y12 %11n -123.45 - $123.45
141tstfmon_n01y12 %^=*#5n 123.45 **123.45 $
142tstfmon_n01y12 %^=*#5n -123.45 - $**123.45
143#
144tstfmon_n02n40 %n 123.45 123.45$
145tstfmon_n02n40 %n -123.45 123.45$-
146tstfmon_n02n40 %11n 123.45 123.45$
147tstfmon_n02n40 %11n -123.45 123.45$-
148tstfmon_n02n40 %^=*#5n 123.45 **123.45$
149tstfmon_n02n40 %^=*#5n -123.45 **123.45$-
150#
151tstfmon_n10y31 %n 123.45 +123.45$
152tstfmon_n10y31 %n -123.45 -$ 123.45
153tstfmon_n10y31 %11n 123.45 +123.45$
154tstfmon_n10y31 %11n -123.45 -$ 123.45
155tstfmon_n10y31 %^=*#5n 123.45 +**123.45$
156tstfmon_n10y31 %^=*#5n -123.45 -$ **123.45
157#
158tstfmon_n11y41 %n 123.45 +123.45 $
159tstfmon_n11y41 %n -123.45 $- 123.45
160tstfmon_n11y41 %11n 123.45 +123.45 $
161tstfmon_n11y41 %11n -123.45 $- 123.45
162tstfmon_n11y41 %^=*#5n 123.45 +**123.45 $
163tstfmon_n11y41 %^=*#5n -123.45 $- **123.45
164#
165tstfmon_n12y11 %n 123.45 +123.45$
166tstfmon_n12y11 %n -123.45 -$ 123.45
167tstfmon_n12y11 %11n 123.45 +123.45$
168tstfmon_n12y11 %11n -123.45 -$ 123.45
169tstfmon_n12y11 %^=*#5n 123.45 +**123.45$
170tstfmon_n12y11 %^=*#5n -123.45 -$ **123.45
171#
172tstfmon_n20n32 %n 123.45 123.45$+
173tstfmon_n20n32 %n -123.45 123.45- $
174tstfmon_n20n32 %11n 123.45 123.45$+
175tstfmon_n20n32 %11n -123.45 123.45- $
176tstfmon_n20n32 %^=*#5n 123.45 **123.45$+
177tstfmon_n20n32 %^=*#5n -123.45 **123.45- $
178#
179tstfmon_n30y20 %n 123.45 123.45+$
180tstfmon_n30y20 %n -123.45 $123.45-
181tstfmon_n30y20 %11n 123.45 123.45+$
182tstfmon_n30y20 %11n -123.45 $123.45-
183tstfmon_n30y20 %^=*#5n 123.45 **123.45+$
184tstfmon_n30y20 %^=*#5n -123.45 $**123.45-
185#
186tstfmon_n41n00 %n 123.45 123.45 $+
187tstfmon_n41n00 %n -123.45 (123.45$)
188tstfmon_n41n00 %11n 123.45 123.45 $+
189tstfmon_n41n00 %11n -123.45 (123.45$)
190tstfmon_n41n00 %^=*#5n 123.45 **123.45 $+
191tstfmon_n41n00 %^=*#5n -123.45 (**123.45$)
192#
193tstfmon_y01y10 %n 123.45 $ 123.45
194tstfmon_y01y10 %n -123.45 -$123.45
195tstfmon_y01y10 %11n 123.45 $ 123.45
196tstfmon_y01y10 %11n -123.45 -$123.45
197tstfmon_y01y10 %^=*#5n 123.45 $ **123.45
198tstfmon_y01y10 %^=*#5n -123.45 -$**123.45
199#
200tstfmon_y02n22 %n 123.45 $123.45
201tstfmon_y02n22 %n -123.45 123.45$ O/D
202tstfmon_y02n22 %12n 123.45 $123.45
203tstfmon_y02n22 %12n -123.45 123.45$ O/D
204tstfmon_y02n22 %^=*#5n 123.45 $**123.45
205tstfmon_y02n22 %^=*#5n -123.45 **123.45$ O/D
206#
207tstfmon_y22n42 %n 123.45 $123.45+
208tstfmon_y22n42 %n -123.45 123.45$ -
209tstfmon_y22n42 %11n 123.45 $123.45+
210tstfmon_y22n42 %11n -123.45 123.45$ -
211tstfmon_y22n42 %^=*#5n 123.45 $**123.45+
212tstfmon_y22n42 %^=*#5n -123.45 **123.45$ -
213#
214tstfmon_y30y21 %n 123.45 +$123.45
215tstfmon_y30y21 %n -123.45 $ 123.45-
216tstfmon_y30y21 %11n 123.45 +$123.45
217tstfmon_y30y21 %11n -123.45 $ 123.45-
218tstfmon_y30y21 %^=*#5n 123.45 +$**123.45
219tstfmon_y30y21 %^=*#5n -123.45 $ **123.45-
220#
221tstfmon_y32n31 %n 123.45 + $123.45
222tstfmon_y32n31 %n -123.45 123.45 -$
223tstfmon_y32n31 %11n 123.45 + $123.45
224tstfmon_y32n31 %11n -123.45 123.45 -$
225tstfmon_y32n31 %^=*#5n 123.45 + $**123.45
226tstfmon_y32n31 %^=*#5n -123.45 **123.45 -$
227#
228tstfmon_y40y00 %n 123.45 $+123.45
229tstfmon_y40y00 %n -123.45 ($123.45)
230tstfmon_y40y00 %11n 123.45 $+123.45
231tstfmon_y40y00 %11n -123.45 ($123.45)
232tstfmon_y40y00 %^=*#5n 123.45 $+**123.45
233tstfmon_y40y00 %^=*#5n -123.45 ($**123.45)
234#
235tstfmon_y42n21 %n 123.45 $ +123.45
236tstfmon_y42n21 %n -123.45 123.45 $-
237tstfmon_y42n21 %11n 123.45 $ +123.45
238tstfmon_y42n21 %11n -123.45 123.45 $-
239tstfmon_y42n21 %^=*#5n 123.45 $ +**123.45
240tstfmon_y42n21 %^=*#5n -123.45 **123.45 $-
dd17514c
UD
241#
242# check all int_cs_precedes/int_sign_posn/int_sep_by_space
243# combinations using special test locales. The six characters after
244# the "_" indicate these three values for positive and then negative
245# quantities.
246#
247tstfmon_n01y12 %i 123.45 "123.45 USC"
248tstfmon_n01y12 %i -123.45 "- USC123.45"
249tstfmon_n01y12 %13i 123.45 " 123.45 USC"
250tstfmon_n01y12 %13i -123.45 " - USC123.45"
251tstfmon_n01y12 %^=*#5i 123.45 " **123.45 USC"
252tstfmon_n01y12 %^=*#5i -123.45 "- USC**123.45"
253#
254tstfmon_n02n40 %i 123.45 "123.45USC"
255tstfmon_n02n40 %i -123.45 "123.45USC-"
256tstfmon_n02n40 %13i 123.45 " 123.45USC"
257tstfmon_n02n40 %13i -123.45 " 123.45USC-"
258tstfmon_n02n40 %^=*#5i 123.45 "**123.45USC"
259tstfmon_n02n40 %^=*#5i -123.45 "**123.45USC-"
260#
261tstfmon_n10y31 %i 123.45 "+123.45USC"
262tstfmon_n10y31 %i -123.45 "-USC 123.45"
263tstfmon_n10y31 %13i 123.45 " +123.45USC"
264tstfmon_n10y31 %13i -123.45 " -USC 123.45"
265tstfmon_n10y31 %^=*#5i 123.45 " +**123.45USC"
266tstfmon_n10y31 %^=*#5i -123.45 "-USC **123.45"
267#
268tstfmon_n11y41 %i 123.45 "+123.45 USC"
269tstfmon_n11y41 %i -123.45 "USC- 123.45"
270tstfmon_n11y41 %13i 123.45 " +123.45 USC"
271tstfmon_n11y41 %13i -123.45 " USC- 123.45"
272tstfmon_n11y41 %^=*#5i 123.45 " +**123.45 USC"
273tstfmon_n11y41 %^=*#5i -123.45 "USC- **123.45"
274#
275tstfmon_n12y11 %i 123.45 "+123.45USC"
276tstfmon_n12y11 %i -123.45 "-USC 123.45"
277tstfmon_n12y11 %13i 123.45 " +123.45USC"
278tstfmon_n12y11 %13i -123.45 " -USC 123.45"
279tstfmon_n12y11 %^=*#5i 123.45 " +**123.45USC"
280tstfmon_n12y11 %^=*#5i -123.45 "-USC **123.45"
281#
282tstfmon_n20n32 %i 123.45 "123.45USC+"
283tstfmon_n20n32 %i -123.45 "123.45- USC"
284tstfmon_n20n32 %13i 123.45 " 123.45USC+"
285tstfmon_n20n32 %13i -123.45 " 123.45- USC"
286tstfmon_n20n32 %^=*#5i 123.45 "**123.45USC+"
287tstfmon_n20n32 %^=*#5i -123.45 "**123.45- USC"
288#
289tstfmon_n30y20 %i 123.45 "123.45+USC"
290tstfmon_n30y20 %i -123.45 "USC123.45-"
291tstfmon_n30y20 %13i 123.45 " 123.45+USC"
292tstfmon_n30y20 %13i -123.45 " USC123.45-"
293tstfmon_n30y20 %^=*#5i 123.45 " **123.45+USC"
294tstfmon_n30y20 %^=*#5i -123.45 "USC**123.45-"
295#
296tstfmon_n41n00 %i 123.45 "123.45 USC+"
297tstfmon_n41n00 %i -123.45 "(123.45USC)"
298tstfmon_n41n00 %13i 123.45 " 123.45 USC+"
299tstfmon_n41n00 %13i -123.45 " (123.45USC)"
300tstfmon_n41n00 %^=*#5i 123.45 " **123.45 USC+"
301tstfmon_n41n00 %^=*#5i -123.45 "(**123.45USC)"
302#
303tstfmon_y01y10 %i 123.45 "USC 123.45"
304tstfmon_y01y10 %i -123.45 "-USC123.45"
305tstfmon_y01y10 %13i 123.45 " USC 123.45"
306tstfmon_y01y10 %13i -123.45 " -USC123.45"
307tstfmon_y01y10 %^=*#5i 123.45 "USC **123.45"
308tstfmon_y01y10 %^=*#5i -123.45 "-USC**123.45"
309#
310tstfmon_y02n22 %i 123.45 "USC123.45"
311tstfmon_y02n22 %i -123.45 "123.45USC O/D"
312tstfmon_y02n22 %12i 123.45 " USC123.45"
313tstfmon_y02n22 %12i -123.45 "123.45USC O/D"
314tstfmon_y02n22 %^=*#5i 123.45 "USC**123.45"
315tstfmon_y02n22 %^=*#5i -123.45 " **123.45USC O/D"
316#
317tstfmon_y22n42 %i 123.45 "USC123.45+"
318tstfmon_y22n42 %i -123.45 "123.45USC -"
319tstfmon_y22n42 %13i 123.45 " USC123.45+"
320tstfmon_y22n42 %13i -123.45 " 123.45USC -"
321tstfmon_y22n42 %^=*#5i 123.45 "USC**123.45+"
322tstfmon_y22n42 %^=*#5i -123.45 " **123.45USC -"
323#
324tstfmon_y30y21 %i 123.45 "+USC123.45"
325tstfmon_y30y21 %i -123.45 "USC 123.45-"
326tstfmon_y30y21 %13i 123.45 " +USC123.45"
327tstfmon_y30y21 %13i -123.45 " USC 123.45-"
328tstfmon_y30y21 %^=*#5i 123.45 "+USC**123.45"
329tstfmon_y30y21 %^=*#5i -123.45 "USC **123.45-"
330#
331tstfmon_y32n31 %i 123.45 "+ USC123.45"
332tstfmon_y32n31 %i -123.45 "123.45 -USC"
333tstfmon_y32n31 %13i 123.45 " + USC123.45"
334tstfmon_y32n31 %13i -123.45 " 123.45 -USC"
335tstfmon_y32n31 %^=*#5i 123.45 "+ USC**123.45"
336tstfmon_y32n31 %^=*#5i -123.45 " **123.45 -USC"
337#
338tstfmon_y40y00 %i 123.45 "USC+123.45"
339tstfmon_y40y00 %i -123.45 "(USC123.45)"
340tstfmon_y40y00 %13i 123.45 " USC+123.45"
341tstfmon_y40y00 %13i -123.45 " (USC123.45)"
342tstfmon_y40y00 %^=*#5i 123.45 "USC+**123.45"
343tstfmon_y40y00 %^=*#5i -123.45 "(USC**123.45)"
344#
345tstfmon_y42n21 %i 123.45 "USC +123.45"
346tstfmon_y42n21 %i -123.45 "123.45 USC-"
347tstfmon_y42n21 %13i 123.45 " USC +123.45"
348tstfmon_y42n21 %13i -123.45 " 123.45 USC-"
349tstfmon_y42n21 %^=*#5i 123.45 "USC +**123.45"
350tstfmon_y42n21 %^=*#5i -123.45 " **123.45 USC-"