3 # Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
7 # The GNU C Library is free software; you can redistribute it and/or
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.
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
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, see
19 # <http://www.gnu.org/licenses/>.
21 common_objpfx=$1; shift
22 run_program_prefix=$1; shift
26 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
27 ${run_program_prefix} \
28 ${common_objpfx}stdio-common/tst-printf \
29 > ${common_objpfx}stdio-common/tst-printf.out || status=1
43 nil pointer (padded): " (nil)"
44 decimal negative: "-2345"
45 octal negative: "37777773327"
46 hex negative: "fffff6d7"
47 long decimal number: "-123456"
48 long octal negative: "37777773327"
49 long unsigned decimal number: "4294843840"
50 zero-padded LDN: "-000123456"
51 left-adjusted ZLDN: "-123456 "
52 space-padded LDN: " -123456"
53 left-adjusted SLDN: "-123456 "
54 zero-padded string: " Hi, Z."
55 left-adjusted Z string: "Hi, Z. "
56 space-padded string: " Hi, Z."
57 left-adjusted S string: "Hi, Z. "
59 limited string: "Good morning, Doctor C"
60 e-style >= 1: "1.234000e+01"
61 e-style >= .1: "1.234000e-01"
62 e-style < .1: "1.234000e-03"
63 e-style big: "1.000000000000000000000000000000000000000000000000000000000000e+20"
64 e-style == .1: "1.000000e-01"
65 f-style >= 1: "12.340000"
66 f-style >= .1: "0.123400"
67 f-style < .1: "0.001234"
69 g-style >= .1: "0.1234"
70 g-style < .1: "0.001234"
71 g-style big: "100000000000000000000"
76 something really insane: 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
77 5.87747175411143754e-39
78 5.87747175411143754e-39
79 5.87747175411143754e-39
80 5.87747175411143754e-39
81 5.87747175411143754e-39
82 5.87747175411143754e-39
83 5.87747175411143754e-39
84 5.87747175411143754e-39
85 5.87747175411143754e-39
86 5.87747175411143754e-39
87 5.87747175411143754e-39
88 5.87747175411143754e-39
89 5.87747175411143754e-39
90 5.87747175411143754e-39
91 5.87747175411143754e-39
92 5.87747175411143754e-39
93 5.87747175411143754e-39
95 | 0.0000| 0.0000e+00| 0|
96 | 1.0000| 1.0000e+00| 1|
97 | -1.0000| -1.0000e+00| -1|
98 | 100.0000| 1.0000e+02| 100|
99 | 1000.0000| 1.0000e+03| 1000|
100 | 10000.0000| 1.0000e+04| 1e+04|
101 | 12345.0000| 1.2345e+04| 1.234e+04|
102 | 100000.0000| 1.0000e+05| 1e+05|
103 | 123456.0000| 1.2346e+05| 1.235e+05|
104 snprintf ("%30s", "foo") == 30, " "
105 snprintf ("%.999999u", 10) == 999999
107 Formatted output test
108 prefix 6d 6o 6x 6X 6u
109 %-+#0 |-123 |0377 |0xff |0XFF |4294967295 |
110 %-+# |-123 |0377 |0xff |0XFF |4294967295 |
111 %-+0 |-123 |377 |ff |FF |4294967295 |
112 %-+ |-123 |377 |ff |FF |4294967295 |
113 %-#0 |-123 |0377 |0xff |0XFF |4294967295 |
114 %-# |-123 |0377 |0xff |0XFF |4294967295 |
115 %-0 |-123 |377 |ff |FF |4294967295 |
116 %- |-123 |377 |ff |FF |4294967295 |
117 %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
118 %+# | -123 | 0377 | 0xff | 0XFF |4294967295 |
119 %+0 |-00123 |000377 |0000ff |0000FF |4294967295 |
120 %+ | -123 | 377 | ff | FF |4294967295 |
121 %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
122 %# | -123 | 0377 | 0xff | 0XFF |4294967295 |
123 %0 |-00123 |000377 |0000ff |0000FF |4294967295 |
124 % | -123 | 377 | ff | FF |4294967295 |
127 1.234568e+06 should be 1.234568e+06
128 1234567.800000 should be 1234567.800000
129 1.23457e+06 should be 1.23457e+06
130 123.456 should be 123.456
131 1e+06 should be 1e+06
135 sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
136 printf ("%hhu", 257) = 1
137 printf ("%hu", 65537) = 1
138 printf ("%hhi", 257) = 1
139 printf ("%hi", 65537) = 1
140 printf ("%1$hhu", 257) = 1
141 printf ("%1$hu", 65537) = 1
142 printf ("%1$hhi", 257) = 1
143 printf ("%1$hi", 65537) = 1
144 --- Should be no further output. ---
146 cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
159 nil pointer (padded): " (nil)"
160 decimal negative: "-2345"
161 octal negative: "37777773327"
162 hex negative: "fffff6d7"
163 long decimal number: "-123456"
164 long octal negative: "1777777777777777773327"
165 long unsigned decimal number: "18446744073709428160"
166 zero-padded LDN: "-000123456"
167 left-adjusted ZLDN: "-123456 "
168 space-padded LDN: " -123456"
169 left-adjusted SLDN: "-123456 "
170 zero-padded string: " Hi, Z."
171 left-adjusted Z string: "Hi, Z. "
172 space-padded string: " Hi, Z."
173 left-adjusted S string: "Hi, Z. "
174 null string: "(null)"
175 limited string: "Good morning, Doctor C"
176 e-style >= 1: "1.234000e+01"
177 e-style >= .1: "1.234000e-01"
178 e-style < .1: "1.234000e-03"
179 e-style big: "1.000000000000000000000000000000000000000000000000000000000000e+20"
180 e-style == .1: "1.000000e-01"
181 f-style >= 1: "12.340000"
182 f-style >= .1: "0.123400"
183 f-style < .1: "0.001234"
184 g-style >= 1: "12.34"
185 g-style >= .1: "0.1234"
186 g-style < .1: "0.001234"
187 g-style big: "100000000000000000000"
192 something really insane: 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
193 5.87747175411143754e-39
194 5.87747175411143754e-39
195 5.87747175411143754e-39
196 5.87747175411143754e-39
197 5.87747175411143754e-39
198 5.87747175411143754e-39
199 5.87747175411143754e-39
200 5.87747175411143754e-39
201 5.87747175411143754e-39
202 5.87747175411143754e-39
203 5.87747175411143754e-39
204 5.87747175411143754e-39
205 5.87747175411143754e-39
206 5.87747175411143754e-39
207 5.87747175411143754e-39
208 5.87747175411143754e-39
209 5.87747175411143754e-39
211 | 0.0000| 0.0000e+00| 0|
212 | 1.0000| 1.0000e+00| 1|
213 | -1.0000| -1.0000e+00| -1|
214 | 100.0000| 1.0000e+02| 100|
215 | 1000.0000| 1.0000e+03| 1000|
216 | 10000.0000| 1.0000e+04| 1e+04|
217 | 12345.0000| 1.2345e+04| 1.234e+04|
218 | 100000.0000| 1.0000e+05| 1e+05|
219 | 123456.0000| 1.2346e+05| 1.235e+05|
220 snprintf ("%30s", "foo") == 30, " "
221 snprintf ("%.999999u", 10) == 999999
223 Formatted output test
224 prefix 6d 6o 6x 6X 6u
225 %-+#0 |-123 |0377 |0xff |0XFF |4294967295 |
226 %-+# |-123 |0377 |0xff |0XFF |4294967295 |
227 %-+0 |-123 |377 |ff |FF |4294967295 |
228 %-+ |-123 |377 |ff |FF |4294967295 |
229 %-#0 |-123 |0377 |0xff |0XFF |4294967295 |
230 %-# |-123 |0377 |0xff |0XFF |4294967295 |
231 %-0 |-123 |377 |ff |FF |4294967295 |
232 %- |-123 |377 |ff |FF |4294967295 |
233 %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
234 %+# | -123 | 0377 | 0xff | 0XFF |4294967295 |
235 %+0 |-00123 |000377 |0000ff |0000FF |4294967295 |
236 %+ | -123 | 377 | ff | FF |4294967295 |
237 %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 |
238 %# | -123 | 0377 | 0xff | 0XFF |4294967295 |
239 %0 |-00123 |000377 |0000ff |0000FF |4294967295 |
240 % | -123 | 377 | ff | FF |4294967295 |
243 1.234568e+06 should be 1.234568e+06
244 1234567.800000 should be 1234567.800000
245 1.23457e+06 should be 1.23457e+06
246 123.456 should be 123.456
247 1e+06 should be 1e+06
251 sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
252 printf ("%hhu", 257) = 1
253 printf ("%hu", 65537) = 1
254 printf ("%hhi", 257) = 1
255 printf ("%hi", 65537) = 1
256 printf ("%1$hhu", 257) = 1
257 printf ("%1$hu", 65537) = 1
258 printf ("%1$hhi", 257) = 1
259 printf ("%1$hi", 65537) = 1
260 --- Should be no further output. ---
262 cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
265 echo "*** output comparison failed"