1 # Test data for test-strfmon, which checks it's implementation in glibc
2 # Copyright (C) 1996, 1997 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 seperated by TABs. Lines that start with a
23 # '#' are comments and are ignored.
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
40 C %=*#9n 1.23 ********1.23
42 # check both the german locale and strfmon with that data
44 de_DE.ISO-8859-1 %n 1.23 DM1,23
45 de_DE.ISO-8859-1 %n -1.23 -DM1,23
46 de_DE.ISO-8859-1 %n 1234.56 DM1.234,56
47 de_DE.ISO-8859-1 %11n 123.45 DM123,45
48 de_DE.ISO-8859-1 %11n -123.45 -DM123,45
49 de_DE.ISO-8859-1 %11n 3456.781 DM3.456,78
50 de_DE.ISO-8859-1 %^n 1234.56 DM1234,56
51 de_DE.ISO-8859-1 %+n 1234.56 DM1.234,56
52 de_DE.ISO-8859-1 %+n -1234.56 -DM1.234,56
53 # The following line ends with a blank
54 de_DE.ISO-8859-1 %(n 1234.56 DM1.234,56
55 de_DE.ISO-8859-1 %(n -1234.56 (DM1.234,56)
56 de_DE.ISO-8859-1 %^n 1234.56 DM1234,56
57 de_DE.ISO-8859-1 %i 1.23 DEM 1,23
58 de_DE.ISO-8859-1 %i -1.23 -DEM 1,23
59 de_DE.ISO-8859-1 %i 1234.56 DEM 1.234,56
60 de_DE.ISO-8859-1 %^i 1234.56 DEM 1234,56
61 de_DE.ISO-8859-1 %+i 1234.56 DEM 1.234,56
62 de_DE.ISO-8859-1 %+i -1234.56 -DEM 1.234,56
63 de_DE.ISO-8859-1 %(i 1234.56 DEM 1.234,56
64 de_DE.ISO-8859-1 %(i -1234.56 (DEM 1.234,56)
65 de_DE.ISO-8859-1 %^i 1234.56 DEM 1234,56
66 de_DE.ISO-8859-1 %#5n 123.45 DM 123,45
67 de_DE.ISO-8859-1 %#5n -123.45 -DM 123,45
68 de_DE.ISO-8859-1 %#5n 3456.781 DM 3.456,78
69 de_DE.ISO-8859-1 %=*#5n 123.45 DM***123,45
70 de_DE.ISO-8859-1 %=*#5n -123.45 -DM***123,45
71 de_DE.ISO-8859-1 %=*#5n 3456.781 DM*3.456,78
72 de_DE.ISO-8859-1 %=0#5n 123.45 DM000123,45
73 de_DE.ISO-8859-1 %=0#5n -123.45 -DM000123,45
74 de_DE.ISO-8859-1 %=0#5n 3456.781 DM03.456,78
75 de_DE.ISO-8859-1 %^#5n 123.45 DM 123,45
76 de_DE.ISO-8859-1 %^#5n -123.45 -DM 123,45
77 de_DE.ISO-8859-1 %^#5n 3456.781 DM 3456,78
78 de_DE.ISO-8859-1 %^#5.0n 123.45 DM 123
79 de_DE.ISO-8859-1 %^#5.0n -123.45 -DM 123
80 de_DE.ISO-8859-1 %^#5.0n 3456.781 DM 3457
81 de_DE.ISO-8859-1 %^#5.4n 123.45 DM 123,4500
82 de_DE.ISO-8859-1 %^#5.4n -123.45 -DM 123,4500
83 de_DE.ISO-8859-1 %^#5.4n 3456.781 DM 3456,7810
84 # This line is followed by a blank!
85 de_DE.ISO-8859-1 %(#5n 123.45 DM 123,45
86 de_DE.ISO-8859-1 %(#5n -123.45 (DM 123,45)
87 # This line is followed by a blank!
88 de_DE.ISO-8859-1 %(#5n 3456.781 DM 3.456,78
89 # This line is followed by a blank!
90 de_DE.ISO-8859-1 %!(#5n 123.45 123,45
91 de_DE.ISO-8859-1 %!(#5n -123.45 ( 123,45)
92 # This line is followed by a blank!
93 de_DE.ISO-8859-1 %!(#5n 3456.781 3.456,78
95 # check both the en_US locale and strfmon with that data
96 # a lot of this checks are created from a strfmon(3) man-page.
98 en_US.ISO-8859-1 %n 123.45 $123.45
99 en_US.ISO-8859-1 %n -123.45 -$123.45
100 en_US.ISO-8859-1 %n 3456.781 $3,456.78
101 en_US.ISO-8859-1 %i 123.45 USD 123.45
102 en_US.ISO-8859-1 %i -123.45 -USD 123.45
103 en_US.ISO-8859-1 %i 3456.781 USD 3,456.78
104 en_US.ISO-8859-1 %11n 123.45 $123.45
105 en_US.ISO-8859-1 %11n -123.45 -$123.45
106 en_US.ISO-8859-1 %11n 3456.781 $3,456.78
107 en_US.ISO-8859-1 %=*#5n 123.45 $***123.45
108 en_US.ISO-8859-1 %=*#5n -123.45 -$***123.45
109 en_US.ISO-8859-1 %=*#5n 3456.781 $*3,456.78
110 en_US.ISO-8859-1 %=0#5n 123.45 $000123.45
111 en_US.ISO-8859-1 %=0#5n -123.45 -$000123.45
112 en_US.ISO-8859-1 %=0#5n 3456.781 $03,456.78
113 en_US.ISO-8859-1 %^#5n 123.45 $ 123.45
114 en_US.ISO-8859-1 %^#5n -123.45 -$ 123.45
115 en_US.ISO-8859-1 %^#5n 3456.781 $ 3456.78
116 en_US.ISO-8859-1 %^#5.0n 123.45 $ 123
117 en_US.ISO-8859-1 %^#5.0n -123.45 -$ 123
118 en_US.ISO-8859-1 %^#5.0n 3456.781 $ 3457
119 en_US.ISO-8859-1 %^#5.4n 123.45 $ 123.4500
120 en_US.ISO-8859-1 %^#5.4n -123.45 -$ 123.4500
121 en_US.ISO-8859-1 %^#5.4n 3456.781 $ 3456.7810
122 # This line is followed by a blank!
123 en_US.ISO-8859-1 %(#5n 123.45 $ 123.45
124 en_US.ISO-8859-1 %(#5n -123.45 ($ 123.45)
125 # This line is followed by a blank!
126 en_US.ISO-8859-1 %(#5n 3456.781 $ 3,456.78
127 # This line is followed by a blank!
128 en_US.ISO-8859-1 %!(#5n 123.45 123.45
129 en_US.ISO-8859-1 %!(#5n -123.45 ( 123.45)
130 # This line is followed by a blank!
131 en_US.ISO-8859-1 %!(#5n 3456.781 3,456.78
132 en_US.ISO-8859-1 %#5n 123.45 $ 123.45
133 en_US.ISO-8859-1 %#5n -123.45 -$ 123.45
134 en_US.ISO-8859-1 %#5n 3456.781 $ 3,456.78