]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/printf.right
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / printf.right
1 printf: usage: printf [-v var] format [arguments]
2 printf: usage: printf [-v var] format [arguments]
3 10
4 one
5 one\ctwo
6 4\.2
7 no newline now newline
8 %
9 %
10 %d
11 A
12 unquoted
13 unquoted quoted
14 unquoted quoted
15 this\&that
16 1 2 3 4 5
17 onestring 0 0 0
18 onestring 0 0 0.00
19 --4.2 --
20 --4.2 --
21 --
22 ^@81--
23 -- A--
24 -- A--
25 A7
26 A7
27 A7
28 A7
29 A7
30 --\"abcd\"--
31 --\'abcd\'--
32 --a\x--
33 ./printf.tests: line 82: printf: missing hex digit for \x
34 --\x--
35 ----
36 ----
37 --4.2
38 --4\.2--
39 --\--
40
41
42 4.4BSD
43 4.4BSD
44 4.4BSD
45 4.4BSD
46 4.4BSD
47 4.4BSD
48 4.4BSD
49 --4.4BSD --
50 4.
51 4.4
52 --4.4BSD --
53 255 255 255 0377 0xff 0xFF
54 255 255 255 0377 0xff 0XFF
55 255 255 255 0377 0xff 0xFF
56 255 255 255 0377 0xff 0XFF
57 42
58 -42
59 42
60 -42
61 4.20
62 4.20
63 4.2
64 4.20
65 4.20
66 4.2
67 4.200000E+00
68 4.200000e+00
69 4.2E+00
70 4.2e+00
71 4.2
72 4.2
73 4.2
74 4.2
75 115
76 115
77 0163
78 0163
79 0x73
80 0X73
81 115.00
82 115.00
83 -- abcd--
84 -- abcd--
85 -- abcdefghij--
86 -- abcdefghij--
87 'abcd'
88 \'abcd\'
89 \abcd\
90 \abcd\
91 26
92 26
93 26
94 ./printf.tests: line 206: printf: `%10': missing format character
95 ./printf.tests: line 207: printf: `M': invalid format character
96 ab./printf.tests: line 210: printf: `y': invalid format character
97 ./printf.tests: line 213: printf: GNU: invalid number
98 0
99 ./printf.tests: line 214: printf: GNU: invalid number
100 0
101 -
102 (foo )(bar )
103 0
104 ab cd ef
105 13
106 ^G
107 ^G
108 ^@7
109 ^Ge
110 "?
111 00001
112 00001
113 1
114 1
115 0
116 0
117 0
118 0
119 4
120 4
121 4
122 4
123 0.000000
124 0.000000
125 0.00
126 0.00
127 4.000000
128 4.000000
129 4.00
130 4.00
131 0.000000E+00
132 0.000000e+00
133 0.00E+00
134 0.00e+00
135 4.000000E+00
136 4.000000e+00
137 4.00E+00
138 4.00e+00
139 9B3A59A5
140 q
141 ''
142 ''
143 s
144
145
146 b
147
148
149 xx
150 xx
151 one
152 one\ctwo
153 4\.2
154 no newline now newline
155 %
156 %
157 %d
158 A
159 unquoted
160 unquoted quoted
161 unquoted quoted
162 this\&that
163 1 2 3 4 5
164 onestring 0 0 0
165 onestring 0 0 0.00
166 --4.2 --
167 --4.2 --
168 -- A--
169 -- A--
170 A7
171 A7
172 A7
173 --\"abcd\"--
174 --\'abcd\'--
175 --a\x--
176 ./printf1.sub: line 94: printf: missing hex digit for \x
177 --\x--
178 ----
179 ----
180 --4.2
181 --4\.2--
182 --\--
183
184
185 4.4BSD
186 4.4BSD
187 4.4BSD
188 4.4BSD
189 4.4BSD
190 4.4BSD
191 4.4BSD
192 --4.4BSD --
193 4.
194 4.4
195 --4.4BSD --
196 255 255 255 0377 0xff 0xFF
197 255 255 255 0377 0xff 0XFF
198 255 255 255 0377 0xff 0xFF
199 255 255 255 0377 0xff 0XFF
200 42
201 -42
202 42
203 -42
204 4.20
205 4.20
206 4.2
207 4.20
208 4.20
209 4.2
210 4.200000E+00
211 4.200000e+00
212 4.2E+00
213 4.2e+00
214 4.2
215 4.2
216 4.2
217 4.2
218 115
219 115
220 0163
221 0163
222 0x73
223 0X73
224 115.00
225 115.00
226 -- abcd--
227 -- abcd--
228 -- abcdefghij--
229 -- abcdefghij--
230 'abcd'
231 \'abcd\'
232 \abcd\
233 \abcd\
234 26
235 26
236 26
237 ./printf1.sub: line 280: printf: `%10': missing format character
238 ./printf1.sub: line 281: printf: `M': invalid format character
239 ./printf1.sub: line 284: printf: `y': invalid format character
240 ./printf1.sub: line 287: printf: GNU: invalid number
241 0
242 ./printf1.sub: line 289: printf: GNU: invalid number
243 0
244 -
245 (foo )(bar )
246 0
247 ab cd ef
248 13
249 ^G
250 ^G
251 ^Ge
252 "?
253 16:09:15
254 ./printf3.sub: line 14: printf: warning: `Z': invalid time format specification
255 %(abde)Z
256 30-May-2010 16:09:15
257 05/30/10 15:09:15
258 current time: 2010-05-30 04:09:15 PM
259 epoch time: 1969-12-31 07:00:00 PM -0500
260 random time: 2010-05-30 04:09:15 PM -0400
261 local time: Sun May 30 16:09:15 EDT 2010
262 Sun May 30 16:09:15 EDT 2010 date-style time
263 05/30/10 (foo) 16:09:15 date-style time
264 x 123x
265 x 123x
266 x 123x
267 x 123x
268 x 123x
269 x 123x
270 x 123.00x
271 x 123.00x
272 x 123.00x
273 x 123.00x
274 x123 x
275 x123 x
276 x+00001e+02x
277 x+00001e+02x
278 x+000000123x
279 x+000000123x
280 x+00001e+02x
281 x+00001e+02x
282 x +123x
283 x +123x
284 x +123x
285 x +123x
286 x 7bx
287 x 7bx
288 x+123 x
289 x+123 x
290 x+123 x
291 x+123 x
292 -123.000000
293 -123.000000
294 x +123x
295 x +123x
296 x +123x
297 x +123x