3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the sqlite_*_printf() interface.
14 # $Id: printf.test,v 1.31 2009/02/01 00:21:10 drh Exp $
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
19 do_test printf-1.1.1 {
20 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
23 do_test printf-1.1.2 {
24 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
26 } {abc: ( 1) ( 1) ( 1) :xyz}
27 do_test printf-1.1.3 {
28 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
30 } {abc: (1 ) (1 ) (1 ) :xyz}
31 do_test printf-1.1.4 {
32 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
34 } {abc: ( +1) ( 1) ( 1) :xyz}
35 do_test printf-1.1.5 {
36 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
38 } {abc: (000001) (000001) (000001) :xyz}
39 do_test printf-1.1.6 {
40 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
42 } {abc: ( 1) ( 1) ( 1) :xyz}
43 do_test printf-1.1.7 {
44 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
46 } {abc: ( 1) ( 0x1) ( 01) :xyz}
47 do_test printf-1.2.1 {
48 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
51 do_test printf-1.2.2 {
52 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
54 } {abc: ( 2) ( 2) ( 2) :xyz}
55 do_test printf-1.2.3 {
56 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
58 } {abc: (2 ) (2 ) (2 ) :xyz}
59 do_test printf-1.2.4 {
60 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
62 } {abc: ( +2) ( 2) ( 2) :xyz}
63 do_test printf-1.2.5 {
64 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
66 } {abc: (000002) (000002) (000002) :xyz}
67 do_test printf-1.2.6 {
68 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
70 } {abc: ( 2) ( 2) ( 2) :xyz}
71 do_test printf-1.2.7 {
72 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
74 } {abc: ( 2) ( 0x2) ( 02) :xyz}
75 do_test printf-1.3.1 {
76 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
79 do_test printf-1.3.2 {
80 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
82 } {abc: ( 5) ( 5) ( 5) :xyz}
83 do_test printf-1.3.3 {
84 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
86 } {abc: (5 ) (5 ) (5 ) :xyz}
87 do_test printf-1.3.4 {
88 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
90 } {abc: ( +5) ( 5) ( 5) :xyz}
91 do_test printf-1.3.5 {
92 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
94 } {abc: (000005) (000005) (000005) :xyz}
95 do_test printf-1.3.6 {
96 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
98 } {abc: ( 5) ( 5) ( 5) :xyz}
99 do_test printf-1.3.7 {
100 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
102 } {abc: ( 5) ( 0x5) ( 05) :xyz}
103 do_test printf-1.4.1 {
104 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
106 } {abc: 10 a 12 :xyz}
107 do_test printf-1.4.2 {
108 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
110 } {abc: ( 10) ( a) ( 12) :xyz}
111 do_test printf-1.4.3 {
112 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
114 } {abc: (10 ) (a ) (12 ) :xyz}
115 do_test printf-1.4.4 {
116 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
118 } {abc: ( +10) ( a) ( 12) :xyz}
119 do_test printf-1.4.5 {
120 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
122 } {abc: (000010) (00000a) (000012) :xyz}
123 do_test printf-1.4.6 {
124 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
126 } {abc: ( 10) ( a) ( 12) :xyz}
127 do_test printf-1.4.7 {
128 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
130 } {abc: ( 10) ( 0xa) ( 012) :xyz}
131 do_test printf-1.5.1 {
132 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
134 } {abc: 99 63 143 :xyz}
135 do_test printf-1.5.2 {
136 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
138 } {abc: ( 99) ( 63) ( 143) :xyz}
139 do_test printf-1.5.3 {
140 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
142 } {abc: (99 ) (63 ) (143 ) :xyz}
143 do_test printf-1.5.4 {
144 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
146 } {abc: ( +99) ( 63) ( 143) :xyz}
147 do_test printf-1.5.5 {
148 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
150 } {abc: (000099) (000063) (000143) :xyz}
151 do_test printf-1.5.6 {
152 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
154 } {abc: ( 99) ( 63) ( 143) :xyz}
155 do_test printf-1.5.7 {
156 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
158 } {abc: ( 99) ( 0x63) ( 0143) :xyz}
159 do_test printf-1.6.1 {
160 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
162 } {abc: 100 64 144 :xyz}
163 do_test printf-1.6.2 {
164 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
166 } {abc: ( 100) ( 64) ( 144) :xyz}
167 do_test printf-1.6.3 {
168 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
170 } {abc: (100 ) (64 ) (144 ) :xyz}
171 do_test printf-1.6.4 {
172 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
174 } {abc: ( +100) ( 64) ( 144) :xyz}
175 do_test printf-1.6.5 {
176 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
178 } {abc: (000100) (000064) (000144) :xyz}
179 do_test printf-1.6.6 {
180 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
182 } {abc: ( 100) ( 64) ( 144) :xyz}
183 do_test printf-1.6.7 {
184 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
186 } {abc: ( 100) ( 0x64) ( 0144) :xyz}
187 do_test printf-1.7.1 {
188 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
189 1000000 1000000 1000000
190 } {abc: 1000000 f4240 3641100 :xyz}
191 do_test printf-1.7.2 {
192 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
193 1000000 1000000 1000000
194 } {abc: (1000000) ( f4240) (3641100) :xyz}
195 do_test printf-1.7.3 {
196 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
197 1000000 1000000 1000000
198 } {abc: (1000000) (f4240 ) (3641100) :xyz}
199 do_test printf-1.7.4 {
200 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
201 1000000 1000000 1000000
202 } {abc: (+1000000) ( f4240) (3641100) :xyz}
203 do_test printf-1.7.5 {
204 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
205 1000000 1000000 1000000
206 } {abc: (1000000) (0f4240) (3641100) :xyz}
207 do_test printf-1.7.6 {
208 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
209 1000000 1000000 1000000
210 } {abc: ( 1000000) ( f4240) (3641100) :xyz}
211 do_test printf-1.7.7 {
212 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
213 1000000 1000000 1000000
214 } {abc: (1000000) (0xf4240) (03641100) :xyz}
215 do_test printf-1.8.1 {
216 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
217 999999999 999999999 999999999
218 } {abc: 999999999 3b9ac9ff 7346544777 :xyz}
219 do_test printf-1.8.2 {
220 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
221 999999999 999999999 999999999
222 } {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
223 do_test printf-1.8.3 {
224 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
225 999999999 999999999 999999999
226 } {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
227 do_test printf-1.8.4 {
228 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
229 999999999 999999999 999999999
230 } {abc: (+999999999) (3b9ac9ff) (7346544777) :xyz}
231 do_test printf-1.8.5 {
232 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
233 999999999 999999999 999999999
234 } {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
235 do_test printf-1.8.6 {
236 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
237 999999999 999999999 999999999
238 } {abc: ( 999999999) (3b9ac9ff) (7346544777) :xyz}
239 do_test printf-1.8.7 {
240 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
241 999999999 999999999 999999999
242 } {abc: (999999999) (0x3b9ac9ff) (07346544777) :xyz}
243 do_test printf-1.9.1 {
244 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
247 do_test printf-1.9.2 {
248 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
250 } {abc: ( 0) ( 0) ( 0) :xyz}
251 do_test printf-1.9.3 {
252 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
254 } {abc: (0 ) (0 ) (0 ) :xyz}
255 do_test printf-1.9.4 {
256 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
258 } {abc: ( +0) ( 0) ( 0) :xyz}
259 do_test printf-1.9.5 {
260 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
262 } {abc: (000000) (000000) (000000) :xyz}
263 do_test printf-1.9.6 {
264 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
266 } {abc: ( 0) ( 0) ( 0) :xyz}
267 do_test printf-1.9.7 {
268 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
270 } {abc: ( 0) ( 0) ( 0) :xyz}
272 do_test printf-1.10.1 {
273 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
274 0xffffffff 0xffffffff 0xffffffff
275 } {abc: -1 ffffffff 37777777777 :xyz}
276 do_test printf-1.10.2 {
277 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
278 0xffffffff 0xffffffff 0xffffffff
279 } {abc: ( -1) (ffffffff) (37777777777) :xyz}
280 do_test printf-1.10.3 {
281 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
282 0xffffffff 0xffffffff 0xffffffff
283 } {abc: (-1 ) (ffffffff) (37777777777) :xyz}
284 do_test printf-1.10.4 {
285 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
286 0xffffffff 0xffffffff 0xffffffff
287 } {abc: ( -1) (ffffffff) (37777777777) :xyz}
288 do_test printf-1.10.5 {
289 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
290 0xffffffff 0xffffffff 0xffffffff
291 } {abc: (-00001) (ffffffff) (37777777777) :xyz}
292 do_test printf-1.10.6 {
293 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
294 0xffffffff 0xffffffff 0xffffffff
295 } {abc: ( -1) (ffffffff) (37777777777) :xyz}
296 do_test printf-1.10.7 {
297 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
298 0xffffffff 0xffffffff 0xffffffff
299 } {abc: ( -1) (0xffffffff) (037777777777) :xyz}
301 do_test printf-1.11.1 {
302 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
303 0xfffffffe 0xfffffffe 0xfffffffe
304 } {abc: -2 fffffffe 37777777776 :xyz}
305 do_test printf-1.11.2 {
306 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
307 0xfffffffe 0xfffffffe 0xfffffffe
308 } {abc: ( -2) (fffffffe) (37777777776) :xyz}
309 do_test printf-1.11.3 {
310 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
311 0xfffffffe 0xfffffffe 0xfffffffe
312 } {abc: (-2 ) (fffffffe) (37777777776) :xyz}
313 do_test printf-1.11.4 {
314 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
315 0xfffffffe 0xfffffffe 0xfffffffe
316 } {abc: ( -2) (fffffffe) (37777777776) :xyz}
317 do_test printf-1.11.5 {
318 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
319 0xfffffffe 0xfffffffe 0xfffffffe
320 } {abc: (-00002) (fffffffe) (37777777776) :xyz}
321 do_test printf-1.11.6 {
322 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
323 0xfffffffe 0xfffffffe 0xfffffffe
324 } {abc: ( -2) (fffffffe) (37777777776) :xyz}
325 do_test printf-1.11.7 {
326 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
327 0xfffffffe 0xfffffffe 0xfffffffe
328 } {abc: ( -2) (0xfffffffe) (037777777776) :xyz}
330 do_test printf-1.12.1 {
331 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
332 0xfffffffb 0xfffffffb 0xfffffffb
333 } {abc: -5 fffffffb 37777777773 :xyz}
334 do_test printf-1.12.2 {
335 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
336 0xfffffffb 0xfffffffb 0xfffffffb
337 } {abc: ( -5) (fffffffb) (37777777773) :xyz}
338 do_test printf-1.12.3 {
339 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
340 0xfffffffb 0xfffffffb 0xfffffffb
341 } {abc: (-5 ) (fffffffb) (37777777773) :xyz}
342 do_test printf-1.12.4 {
343 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
344 0xfffffffb 0xfffffffb 0xfffffffb
345 } {abc: ( -5) (fffffffb) (37777777773) :xyz}
346 do_test printf-1.12.5 {
347 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
348 0xfffffffb 0xfffffffb 0xfffffffb
349 } {abc: (-00005) (fffffffb) (37777777773) :xyz}
350 do_test printf-1.12.6 {
351 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
352 0xfffffffb 0xfffffffb 0xfffffffb
353 } {abc: ( -5) (fffffffb) (37777777773) :xyz}
354 do_test printf-1.12.7 {
355 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
356 0xfffffffb 0xfffffffb 0xfffffffb
357 } {abc: ( -5) (0xfffffffb) (037777777773) :xyz}
359 do_test printf-1.13.1 {
360 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
361 0xfffffff6 0xfffffff6 0xfffffff6
362 } {abc: -10 fffffff6 37777777766 :xyz}
363 do_test printf-1.13.2 {
364 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
365 0xfffffff6 0xfffffff6 0xfffffff6
366 } {abc: ( -10) (fffffff6) (37777777766) :xyz}
367 do_test printf-1.13.3 {
368 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
369 0xfffffff6 0xfffffff6 0xfffffff6
370 } {abc: (-10 ) (fffffff6) (37777777766) :xyz}
371 do_test printf-1.13.4 {
372 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
373 0xfffffff6 0xfffffff6 0xfffffff6
374 } {abc: ( -10) (fffffff6) (37777777766) :xyz}
375 do_test printf-1.13.5 {
376 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
377 0xfffffff6 0xfffffff6 0xfffffff6
378 } {abc: (-00010) (fffffff6) (37777777766) :xyz}
379 do_test printf-1.13.6 {
380 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
381 0xfffffff6 0xfffffff6 0xfffffff6
382 } {abc: ( -10) (fffffff6) (37777777766) :xyz}
383 do_test printf-1.13.7 {
384 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
385 0xfffffff6 0xfffffff6 0xfffffff6
386 } {abc: ( -10) (0xfffffff6) (037777777766) :xyz}
388 do_test printf-1.14.1 {
389 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
390 0xffffff9d 0xffffff9d 0xffffff9d
391 } {abc: -99 ffffff9d 37777777635 :xyz}
392 do_test printf-1.14.2 {
393 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
394 0xffffff9d 0xffffff9d 0xffffff9d
395 } {abc: ( -99) (ffffff9d) (37777777635) :xyz}
396 do_test printf-1.14.3 {
397 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
398 0xffffff9d 0xffffff9d 0xffffff9d
399 } {abc: (-99 ) (ffffff9d) (37777777635) :xyz}
400 do_test printf-1.14.4 {
401 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
402 0xffffff9d 0xffffff9d 0xffffff9d
403 } {abc: ( -99) (ffffff9d) (37777777635) :xyz}
404 do_test printf-1.14.5 {
405 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
406 0xffffff9d 0xffffff9d 0xffffff9d
407 } {abc: (-00099) (ffffff9d) (37777777635) :xyz}
408 do_test printf-1.14.6 {
409 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
410 0xffffff9d 0xffffff9d 0xffffff9d
411 } {abc: ( -99) (ffffff9d) (37777777635) :xyz}
412 do_test printf-1.14.7 {
413 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
414 0xffffff9d 0xffffff9d 0xffffff9d
415 } {abc: ( -99) (0xffffff9d) (037777777635) :xyz}
417 do_test printf-1.15.1 {
418 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
419 0xffffff9c 0xffffff9c 0xffffff9c
420 } {abc: -100 ffffff9c 37777777634 :xyz}
421 do_test printf-1.15.2 {
422 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
423 0xffffff9c 0xffffff9c 0xffffff9c
424 } {abc: ( -100) (ffffff9c) (37777777634) :xyz}
425 do_test printf-1.15.3 {
426 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
427 0xffffff9c 0xffffff9c 0xffffff9c
428 } {abc: (-100 ) (ffffff9c) (37777777634) :xyz}
429 do_test printf-1.15.4 {
430 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
431 0xffffff9c 0xffffff9c 0xffffff9c
432 } {abc: ( -100) (ffffff9c) (37777777634) :xyz}
433 do_test printf-1.15.5 {
434 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
435 0xffffff9c 0xffffff9c 0xffffff9c
436 } {abc: (-00100) (ffffff9c) (37777777634) :xyz}
437 do_test printf-1.15.6 {
438 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
439 0xffffff9c 0xffffff9c 0xffffff9c
440 } {abc: ( -100) (ffffff9c) (37777777634) :xyz}
441 do_test printf-1.15.7 {
442 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
443 0xffffff9c 0xffffff9c 0xffffff9c
444 } {abc: ( -100) (0xffffff9c) (037777777634) :xyz}
445 # 0xff676981 == -9999999
446 do_test printf-1.16.1 {
447 sqlite3_mprintf_int {abc: %d %x %o :xyz}\
448 0xff676981 0xff676981 0xff676981
449 } {abc: -9999999 ff676981 37731664601 :xyz}
450 do_test printf-1.16.2 {
451 sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
452 0xff676981 0xff676981 0xff676981
453 } {abc: (-9999999) (ff676981) (37731664601) :xyz}
454 do_test printf-1.16.3 {
455 sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
456 0xff676981 0xff676981 0xff676981
457 } {abc: (-9999999) (ff676981) (37731664601) :xyz}
458 do_test printf-1.16.4 {
459 sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
460 0xff676981 0xff676981 0xff676981
461 } {abc: (-9999999) (ff676981) (37731664601) :xyz}
462 do_test printf-1.16.5 {
463 sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
464 0xff676981 0xff676981 0xff676981
465 } {abc: (-9999999) (ff676981) (37731664601) :xyz}
466 do_test printf-1.16.6 {
467 sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
468 0xff676981 0xff676981 0xff676981
469 } {abc: (-9999999) (ff676981) (37731664601) :xyz}
470 do_test printf-1.16.7 {
471 sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
472 0xff676981 0xff676981 0xff676981
473 } {abc: (-9999999) (0xff676981) (037731664601) :xyz}
474 do_test printf-1.17.1 {
475 sqlite3_mprintf_int {abd: %2147483647d %2147483647x %2147483647o} 1 1 1
477 do_test printf-1.17.2 {
478 sqlite3_mprintf_int {abd: %*d %x} 2147483647 1 1
480 do_test printf-1.17.3 {
481 sqlite3_mprintf_int {abd: %*d %x} -2147483648 1 1
483 do_test printf-1.17.4 {
484 sqlite3_mprintf_int {abd: %.2147483648d %x %x} 1 1 1
486 do_test printf-2.1.1.1 {
487 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 0.001
489 do_test printf-2.1.1.2 {
490 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 0.001
491 } {abc: (1.0e-03) :xyz}
492 do_test printf-2.1.1.3 {
493 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 0.001
494 } {abc: (0.001) :xyz}
495 do_test printf-2.1.1.4 {
496 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 0.001
497 } {abc: 1 1 (0.001) :xyz}
498 do_test printf-2.1.1.5 {
499 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 0.001
500 } {abc: 1 1 (0.00100000) :xyz}
501 do_test printf-2.1.1.6 {
502 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 0.001
503 } {abc: 1 1 (000000.001) :xyz}
504 do_test printf-2.1.1.7 {
505 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 0.001
506 } {abc: 1 1 (0.0) :xyz}
507 do_test printf-2.1.1.8 {
508 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 0.001
509 } {abc: 1 1 (1.0e-03) :xyz}
510 do_test printf-2.1.1.9 {
511 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 0.001
512 } {abc: 1 1 (0.001) :xyz}
513 do_test printf-2.1.2.1 {
514 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 1.0e-20
516 do_test printf-2.1.2.2 {
517 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 1.0e-20
518 } {abc: (1.0e-20) :xyz}
519 do_test printf-2.1.2.3 {
520 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 1.0e-20
521 } {abc: (1e-20) :xyz}
522 do_test printf-2.1.2.4 {
523 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 1.0e-20
524 } {abc: 1 1 (1e-20) :xyz}
525 do_test printf-2.1.2.5 {
526 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 1.0e-20
527 } {abc: 1 1 (1.00000e-20) :xyz}
528 do_test printf-2.1.2.6 {
529 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 1.0e-20
530 } {abc: 1 1 (000001e-20) :xyz}
531 do_test printf-2.1.2.7 {
532 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 1.0e-20
533 } {abc: 1 1 (0.0) :xyz}
534 do_test printf-2.1.2.8 {
535 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 1.0e-20
536 } {abc: 1 1 (1.0e-20) :xyz}
537 do_test printf-2.1.2.9 {
538 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 1.0e-20
539 } {abc: 1 1 (1e-20) :xyz}
540 if {$SQLITE_MAX_LENGTH<=[expr 1000*1000*1000]} {
541 do_test printf-2.1.2.10 {
542 sqlite3_mprintf_double {abc: %*.*f} 2000000000 1000000000 1.0e-20
545 do_test printf-2.1.3.1 {
546 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 1.0
548 do_test printf-2.1.3.2 {
549 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 1.0
550 } {abc: (1.0e+00) :xyz}
551 do_test printf-2.1.3.3 {
552 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 1.0
554 do_test printf-2.1.3.4 {
555 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 1.0
556 } {abc: 1 1 (1) :xyz}
557 do_test printf-2.1.3.5 {
558 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 1.0
559 } {abc: 1 1 (1.00000) :xyz}
560 do_test printf-2.1.3.6 {
561 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 1.0
562 } {abc: 1 1 (0000000001) :xyz}
563 do_test printf-2.1.3.7 {
564 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 1.0
565 } {abc: 1 1 (1.0) :xyz}
566 do_test printf-2.1.3.8 {
567 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 1.0
568 } {abc: 1 1 (1.0e+00) :xyz}
569 do_test printf-2.1.3.9 {
570 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 1.0
571 } {abc: 1 1 (1) :xyz}
572 do_test printf-2.1.4.1 {
573 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 0.0
575 do_test printf-2.1.4.2 {
576 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 0.0
577 } {abc: (0.0e+00) :xyz}
578 do_test printf-2.1.4.3 {
579 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 0.0
581 do_test printf-2.1.4.4 {
582 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 0.0
583 } {abc: 1 1 (0) :xyz}
584 do_test printf-2.1.4.5 {
585 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 0.0
586 } {abc: 1 1 (0.00000) :xyz}
587 do_test printf-2.1.4.6 {
588 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 0.0
589 } {abc: 1 1 (0000000000) :xyz}
590 do_test printf-2.1.4.7 {
591 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 0.0
592 } {abc: 1 1 (0.0) :xyz}
593 do_test printf-2.1.4.8 {
594 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 0.0
595 } {abc: 1 1 (0.0e+00) :xyz}
596 do_test printf-2.1.4.9 {
597 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 0.0
598 } {abc: 1 1 (0) :xyz}
599 do_test printf-2.1.5.1 {
600 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 100.0
601 } {abc: (100.0) :xyz}
602 do_test printf-2.1.5.2 {
603 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 100.0
604 } {abc: (1.0e+02) :xyz}
605 do_test printf-2.1.5.3 {
606 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 100.0
607 } {abc: (1e+02) :xyz}
608 do_test printf-2.1.5.4 {
609 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 100.0
610 } {abc: 1 1 (100) :xyz}
611 do_test printf-2.1.5.5 {
612 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 100.0
613 } {abc: 1 1 (100.000) :xyz}
614 do_test printf-2.1.5.6 {
615 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 100.0
616 } {abc: 1 1 (0000000100) :xyz}
617 do_test printf-2.1.5.7 {
618 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 100.0
619 } {abc: 1 1 (100.0) :xyz}
620 do_test printf-2.1.5.8 {
621 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 100.0
622 } {abc: 1 1 (1.0e+02) :xyz}
623 do_test printf-2.1.5.9 {
624 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 100.0
625 } {abc: 1 1 (1e+02) :xyz}
626 do_test printf-2.1.6.1 {
627 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 9.99999
629 do_test printf-2.1.6.2 {
630 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 9.99999
631 } {abc: (1.0e+01) :xyz}
632 do_test printf-2.1.6.3 {
633 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 9.99999
634 } {abc: (1e+01) :xyz}
635 do_test printf-2.1.6.4 {
636 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 9.99999
637 } {abc: 1 1 (9.99999) :xyz}
638 do_test printf-2.1.6.5 {
639 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 9.99999
640 } {abc: 1 1 (9.99999) :xyz}
641 do_test printf-2.1.6.6 {
642 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 9.99999
643 } {abc: 1 1 (0009.99999) :xyz}
644 do_test printf-2.1.6.7 {
645 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 9.99999
646 } {abc: 1 1 (10.0) :xyz}
647 do_test printf-2.1.6.8 {
648 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 9.99999
649 } {abc: 1 1 (1.0e+01) :xyz}
650 do_test printf-2.1.6.9 {
651 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 9.99999
652 } {abc: 1 1 (1e+01) :xyz}
653 do_test printf-2.1.7.1 {
654 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -0.00543
656 do_test printf-2.1.7.2 {
657 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -0.00543
658 } {abc: (-5.4e-03) :xyz}
659 do_test printf-2.1.7.3 {
660 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -0.00543
661 } {abc: (-0.005) :xyz}
662 do_test printf-2.1.7.4 {
663 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -0.00543
664 } {abc: 1 1 (-0.00543) :xyz}
665 do_test printf-2.1.7.5 {
666 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -0.00543
667 } {abc: 1 1 (-0.00543000) :xyz}
668 do_test printf-2.1.7.6 {
669 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -0.00543
670 } {abc: 1 1 (-000.00543) :xyz}
671 do_test printf-2.1.7.7 {
672 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -0.00543
673 } {abc: 1 1 (-0.0) :xyz}
674 do_test printf-2.1.7.8 {
675 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -0.00543
676 } {abc: 1 1 (-5.4e-03) :xyz}
677 do_test printf-2.1.7.9 {
678 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -0.00543
679 } {abc: 1 1 (-0.005) :xyz}
680 do_test printf-2.1.8.1 {
681 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -1.0
683 do_test printf-2.1.8.2 {
684 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -1.0
685 } {abc: (-1.0e+00) :xyz}
686 do_test printf-2.1.8.3 {
687 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -1.0
689 do_test printf-2.1.8.4 {
690 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -1.0
691 } {abc: 1 1 (-1) :xyz}
692 do_test printf-2.1.8.5 {
693 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -1.0
694 } {abc: 1 1 (-1.00000) :xyz}
695 do_test printf-2.1.8.6 {
696 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -1.0
697 } {abc: 1 1 (-000000001) :xyz}
698 do_test printf-2.1.8.7 {
699 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -1.0
700 } {abc: 1 1 (-1.0) :xyz}
701 do_test printf-2.1.8.8 {
702 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -1.0
703 } {abc: 1 1 (-1.0e+00) :xyz}
704 do_test printf-2.1.8.9 {
705 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -1.0
706 } {abc: 1 1 (-1) :xyz}
707 do_test printf-2.1.9.1 {
708 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -99.99999
709 } {abc: (-100.0) :xyz}
710 do_test printf-2.1.9.2 {
711 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -99.99999
712 } {abc: (-1.0e+02) :xyz}
713 do_test printf-2.1.9.3 {
714 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -99.99999
715 } {abc: (-1e+02) :xyz}
716 do_test printf-2.1.9.4 {
717 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -99.99999
718 } {abc: 1 1 (-100) :xyz}
719 do_test printf-2.1.9.5 {
720 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -99.99999
721 } {abc: 1 1 (-100.000) :xyz}
722 do_test printf-2.1.9.6 {
723 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -99.99999
724 } {abc: 1 1 (-000000100) :xyz}
725 do_test printf-2.1.9.7 {
726 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -99.99999
727 } {abc: 1 1 (-100.0) :xyz}
728 do_test printf-2.1.9.8 {
729 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -99.99999
730 } {abc: 1 1 (-1.0e+02) :xyz}
731 do_test printf-2.1.9.9 {
732 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -99.99999
733 } {abc: 1 1 (-1e+02) :xyz}
734 do_test printf-2.1.10.1 {
735 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 3.14e+9
736 } {abc: (3140000000.0) :xyz}
737 do_test printf-2.1.10.2 {
738 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 3.14e+9
739 } {abc: (3.1e+09) :xyz}
740 do_test printf-2.1.10.3 {
741 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 3.14e+9
742 } {abc: (3e+09) :xyz}
743 do_test printf-2.1.10.4 {
744 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 3.14e+9
745 } {abc: 1 1 (3.14e+09) :xyz}
746 do_test printf-2.1.10.5 {
747 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 3.14e+9
748 } {abc: 1 1 (3.14000e+09) :xyz}
749 do_test printf-2.1.10.6 {
750 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 3.14e+9
751 } {abc: 1 1 (003.14e+09) :xyz}
752 do_test printf-2.1.10.7 {
753 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 3.14e+9
754 } {abc: 1 1 (3140000000.0) :xyz}
755 do_test printf-2.1.10.8 {
756 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 3.14e+9
757 } {abc: 1 1 (3.1e+09) :xyz}
758 do_test printf-2.1.10.9 {
759 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 3.14e+9
760 } {abc: 1 1 (3e+09) :xyz}
761 do_test printf-2.1.11.2 {
762 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -4.72732e+88
763 } {abc: (-4.7e+88) :xyz}
764 do_test printf-2.1.11.3 {
765 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -4.72732e+88
766 } {abc: (-5e+88) :xyz}
767 do_test printf-2.1.11.4 {
768 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -4.72732e+88
769 } {abc: 1 1 (-4.72732e+88) :xyz}
770 do_test printf-2.1.11.5 {
771 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -4.72732e+88
772 } {abc: 1 1 (-4.72732e+88) :xyz}
773 do_test printf-2.1.11.6 {
774 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -4.72732e+88
775 } {abc: 1 1 (-4.72732e+88) :xyz}
776 do_test printf-2.1.11.8 {
777 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -4.72732e+88
778 } {abc: 1 1 (-4.7e+88) :xyz}
779 do_test printf-2.1.11.9 {
780 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -4.72732e+88
781 } {abc: 1 1 (-5e+88) :xyz}
782 do_test printf-2.1.12.2 {
783 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 9.87991e+143
784 } {abc: (9.9e+143) :xyz}
785 do_test printf-2.1.12.3 {
786 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 9.87991e+143
787 } {abc: (1e+144) :xyz}
788 do_test printf-2.1.12.4 {
789 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 9.87991e+143
790 } {abc: 1 1 (9.87991e+143) :xyz}
791 do_test printf-2.1.12.5 {
792 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 9.87991e+143
793 } {abc: 1 1 (9.87991e+143) :xyz}
794 do_test printf-2.1.12.6 {
795 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 9.87991e+143
796 } {abc: 1 1 (9.87991e+143) :xyz}
797 do_test printf-2.1.12.8 {
798 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 9.87991e+143
799 } {abc: 1 1 (9.9e+143) :xyz}
800 do_test printf-2.1.12.9 {
801 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 9.87991e+143
802 } {abc: 1 1 (1e+144) :xyz}
803 do_test printf-2.1.13.1 {
804 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -6.287291e-9
806 do_test printf-2.1.13.2 {
807 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -6.287291e-9
808 } {abc: (-6.3e-09) :xyz}
809 do_test printf-2.1.13.3 {
810 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -6.287291e-9
811 } {abc: (-6e-09) :xyz}
812 do_test printf-2.1.13.4 {
813 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -6.287291e-9
814 } {abc: 1 1 (-6.28729e-09) :xyz}
815 do_test printf-2.1.13.5 {
816 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -6.287291e-9
817 } {abc: 1 1 (-6.28729e-09) :xyz}
818 do_test printf-2.1.13.6 {
819 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -6.287291e-9
820 } {abc: 1 1 (-6.28729e-09) :xyz}
821 do_test printf-2.1.13.7 {
822 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -6.287291e-9
823 } {abc: 1 1 (-0.0) :xyz}
824 do_test printf-2.1.13.8 {
825 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -6.287291e-9
826 } {abc: 1 1 (-6.3e-09) :xyz}
827 do_test printf-2.1.13.9 {
828 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -6.287291e-9
829 } {abc: 1 1 (-6e-09) :xyz}
830 do_test printf-2.1.14.1 {
831 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 3.38826392e-110
833 do_test printf-2.1.14.2 {
834 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 3.38826392e-110
835 } {abc: (3.4e-110) :xyz}
836 do_test printf-2.1.14.3 {
837 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 3.38826392e-110
838 } {abc: (3e-110) :xyz}
839 do_test printf-2.1.14.4 {
840 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 3.38826392e-110
841 } {abc: 1 1 (3.38826e-110) :xyz}
842 do_test printf-2.1.14.5 {
843 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 3.38826392e-110
844 } {abc: 1 1 (3.38826e-110) :xyz}
845 do_test printf-2.1.14.6 {
846 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 3.38826392e-110
847 } {abc: 1 1 (3.38826e-110) :xyz}
848 do_test printf-2.1.14.7 {
849 sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 3.38826392e-110
850 } {abc: 1 1 (0.0) :xyz}
851 do_test printf-2.1.14.8 {
852 sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 3.38826392e-110
853 } {abc: 1 1 (3.4e-110) :xyz}
854 do_test printf-2.1.14.9 {
855 sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 3.38826392e-110
856 } {abc: 1 1 (3e-110) :xyz}
857 do_test printf-2.2.1.1 {
858 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 0.001
859 } {abc: (0.00100) :xyz}
860 do_test printf-2.2.1.2 {
861 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 0.001
862 } {abc: (1.00000e-03) :xyz}
863 do_test printf-2.2.1.3 {
864 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 0.001
865 } {abc: (0.001) :xyz}
866 do_test printf-2.2.1.4 {
867 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 0.001
868 } {abc: 5 5 (0.001) :xyz}
869 do_test printf-2.2.1.5 {
870 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 0.001
871 } {abc: 5 5 (0.00100000) :xyz}
872 do_test printf-2.2.1.6 {
873 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 0.001
874 } {abc: 5 5 (000000.001) :xyz}
875 do_test printf-2.2.1.7 {
876 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 0.001
877 } {abc: 5 5 (0.00100) :xyz}
878 do_test printf-2.2.1.8 {
879 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 0.001
880 } {abc: 5 5 (1.00000e-03) :xyz}
881 do_test printf-2.2.1.9 {
882 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 0.001
883 } {abc: 5 5 (0.001) :xyz}
884 do_test printf-2.2.2.1 {
885 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 1.0e-20
886 } {abc: (0.00000) :xyz}
887 do_test printf-2.2.2.2 {
888 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 1.0e-20
889 } {abc: (1.00000e-20) :xyz}
890 do_test printf-2.2.2.3 {
891 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 1.0e-20
892 } {abc: (1e-20) :xyz}
893 do_test printf-2.2.2.4 {
894 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 1.0e-20
895 } {abc: 5 5 (1e-20) :xyz}
896 do_test printf-2.2.2.5 {
897 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 1.0e-20
898 } {abc: 5 5 (1.00000e-20) :xyz}
899 do_test printf-2.2.2.6 {
900 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 1.0e-20
901 } {abc: 5 5 (000001e-20) :xyz}
902 do_test printf-2.2.2.7 {
903 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 1.0e-20
904 } {abc: 5 5 (0.00000) :xyz}
905 do_test printf-2.2.2.8 {
906 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 1.0e-20
907 } {abc: 5 5 (1.00000e-20) :xyz}
908 do_test printf-2.2.2.9 {
909 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 1.0e-20
910 } {abc: 5 5 (1e-20) :xyz}
911 do_test printf-2.2.3.1 {
912 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 1.0
913 } {abc: (1.00000) :xyz}
914 do_test printf-2.2.3.2 {
915 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 1.0
916 } {abc: (1.00000e+00) :xyz}
917 do_test printf-2.2.3.3 {
918 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 1.0
920 do_test printf-2.2.3.4 {
921 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 1.0
922 } {abc: 5 5 (1) :xyz}
923 do_test printf-2.2.3.5 {
924 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 1.0
925 } {abc: 5 5 (1.00000) :xyz}
926 do_test printf-2.2.3.6 {
927 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 1.0
928 } {abc: 5 5 (0000000001) :xyz}
929 do_test printf-2.2.3.7 {
930 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 1.0
931 } {abc: 5 5 (1.00000) :xyz}
932 do_test printf-2.2.3.8 {
933 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 1.0
934 } {abc: 5 5 (1.00000e+00) :xyz}
935 do_test printf-2.2.3.9 {
936 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 1.0
937 } {abc: 5 5 ( 1) :xyz}
938 do_test printf-2.2.4.1 {
939 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 0.0
940 } {abc: (0.00000) :xyz}
941 do_test printf-2.2.4.2 {
942 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 0.0
943 } {abc: (0.00000e+00) :xyz}
944 do_test printf-2.2.4.3 {
945 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 0.0
947 do_test printf-2.2.4.4 {
948 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 0.0
949 } {abc: 5 5 (0) :xyz}
950 do_test printf-2.2.4.5 {
951 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 0.0
952 } {abc: 5 5 (0.00000) :xyz}
953 do_test printf-2.2.4.6 {
954 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 0.0
955 } {abc: 5 5 (0000000000) :xyz}
956 do_test printf-2.2.4.7 {
957 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 0.0
958 } {abc: 5 5 (0.00000) :xyz}
959 do_test printf-2.2.4.8 {
960 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 0.0
961 } {abc: 5 5 (0.00000e+00) :xyz}
962 do_test printf-2.2.4.9 {
963 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 0.0
964 } {abc: 5 5 ( 0) :xyz}
965 do_test printf-2.2.5.1 {
966 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 100.0
967 } {abc: (100.00000) :xyz}
968 do_test printf-2.2.5.2 {
969 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 100.0
970 } {abc: (1.00000e+02) :xyz}
971 do_test printf-2.2.5.3 {
972 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 100.0
974 do_test printf-2.2.5.4 {
975 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 100.0
976 } {abc: 5 5 (100) :xyz}
977 do_test printf-2.2.5.5 {
978 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 100.0
979 } {abc: 5 5 (100.000) :xyz}
980 do_test printf-2.2.5.6 {
981 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 100.0
982 } {abc: 5 5 (0000000100) :xyz}
983 do_test printf-2.2.5.7 {
984 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 100.0
985 } {abc: 5 5 (100.00000) :xyz}
986 do_test printf-2.2.5.8 {
987 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 100.0
988 } {abc: 5 5 (1.00000e+02) :xyz}
989 do_test printf-2.2.5.9 {
990 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 100.0
991 } {abc: 5 5 ( 100) :xyz}
992 do_test printf-2.2.6.1 {
993 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 9.99999
994 } {abc: (9.99999) :xyz}
995 do_test printf-2.2.6.2 {
996 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 9.99999
997 } {abc: (9.99999e+00) :xyz}
998 do_test printf-2.2.6.3 {
999 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 9.99999
1001 do_test printf-2.2.6.4 {
1002 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 9.99999
1003 } {abc: 5 5 (9.99999) :xyz}
1004 do_test printf-2.2.6.5 {
1005 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 9.99999
1006 } {abc: 5 5 (9.99999) :xyz}
1007 do_test printf-2.2.6.6 {
1008 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 9.99999
1009 } {abc: 5 5 (0009.99999) :xyz}
1010 do_test printf-2.2.6.7 {
1011 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 9.99999
1012 } {abc: 5 5 (9.99999) :xyz}
1013 do_test printf-2.2.6.8 {
1014 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 9.99999
1015 } {abc: 5 5 (9.99999e+00) :xyz}
1016 do_test printf-2.2.6.9 {
1017 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 9.99999
1018 } {abc: 5 5 ( 10) :xyz}
1019 do_test printf-2.2.7.1 {
1020 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -0.00543
1021 } {abc: (-0.00543) :xyz}
1022 do_test printf-2.2.7.2 {
1023 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -0.00543
1024 } {abc: (-5.43000e-03) :xyz}
1025 do_test printf-2.2.7.3 {
1026 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -0.00543
1027 } {abc: (-0.00543) :xyz}
1028 do_test printf-2.2.7.4 {
1029 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -0.00543
1030 } {abc: 5 5 (-0.00543) :xyz}
1031 do_test printf-2.2.7.5 {
1032 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -0.00543
1033 } {abc: 5 5 (-0.00543000) :xyz}
1034 do_test printf-2.2.7.6 {
1035 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -0.00543
1036 } {abc: 5 5 (-000.00543) :xyz}
1037 do_test printf-2.2.7.7 {
1038 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -0.00543
1039 } {abc: 5 5 (-0.00543) :xyz}
1040 do_test printf-2.2.7.8 {
1041 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -0.00543
1042 } {abc: 5 5 (-5.43000e-03) :xyz}
1043 do_test printf-2.2.7.9 {
1044 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -0.00543
1045 } {abc: 5 5 (-0.00543) :xyz}
1046 do_test printf-2.2.8.1 {
1047 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -1.0
1048 } {abc: (-1.00000) :xyz}
1049 do_test printf-2.2.8.2 {
1050 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -1.0
1051 } {abc: (-1.00000e+00) :xyz}
1052 do_test printf-2.2.8.3 {
1053 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -1.0
1055 do_test printf-2.2.8.4 {
1056 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -1.0
1057 } {abc: 5 5 (-1) :xyz}
1058 do_test printf-2.2.8.5 {
1059 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -1.0
1060 } {abc: 5 5 (-1.00000) :xyz}
1061 do_test printf-2.2.8.6 {
1062 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -1.0
1063 } {abc: 5 5 (-000000001) :xyz}
1064 do_test printf-2.2.8.7 {
1065 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -1.0
1066 } {abc: 5 5 (-1.00000) :xyz}
1067 do_test printf-2.2.8.8 {
1068 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -1.0
1069 } {abc: 5 5 (-1.00000e+00) :xyz}
1070 do_test printf-2.2.8.9 {
1071 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -1.0
1072 } {abc: 5 5 ( -1) :xyz}
1073 do_test printf-2.2.9.1 {
1074 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -99.99999
1075 } {abc: (-99.99999) :xyz}
1076 do_test printf-2.2.9.2 {
1077 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -99.99999
1078 } {abc: (-1.00000e+02) :xyz}
1079 do_test printf-2.2.9.3 {
1080 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -99.99999
1081 } {abc: ( -100) :xyz}
1082 do_test printf-2.2.9.4 {
1083 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -99.99999
1084 } {abc: 5 5 (-100) :xyz}
1085 do_test printf-2.2.9.5 {
1086 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -99.99999
1087 } {abc: 5 5 (-100.000) :xyz}
1088 do_test printf-2.2.9.6 {
1089 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -99.99999
1090 } {abc: 5 5 (-000000100) :xyz}
1091 do_test printf-2.2.9.7 {
1092 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -99.99999
1093 } {abc: 5 5 (-99.99999) :xyz}
1094 do_test printf-2.2.9.8 {
1095 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -99.99999
1096 } {abc: 5 5 (-1.00000e+02) :xyz}
1097 do_test printf-2.2.9.9 {
1098 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -99.99999
1099 } {abc: 5 5 ( -100) :xyz}
1100 do_test printf-2.2.10.1 {
1101 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 3.14e+9
1102 } {abc: (3140000000.00000) :xyz}
1103 do_test printf-2.2.10.2 {
1104 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 3.14e+9
1105 } {abc: (3.14000e+09) :xyz}
1106 do_test printf-2.2.10.3 {
1107 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 3.14e+9
1108 } {abc: (3.14e+09) :xyz}
1109 do_test printf-2.2.10.4 {
1110 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 3.14e+9
1111 } {abc: 5 5 (3.14e+09) :xyz}
1112 do_test printf-2.2.10.5 {
1113 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 3.14e+9
1114 } {abc: 5 5 (3.14000e+09) :xyz}
1115 do_test printf-2.2.10.6 {
1116 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 3.14e+9
1117 } {abc: 5 5 (003.14e+09) :xyz}
1118 do_test printf-2.2.10.7 {
1119 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 3.14e+9
1120 } {abc: 5 5 (3140000000.00000) :xyz}
1121 do_test printf-2.2.10.8 {
1122 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 3.14e+9
1123 } {abc: 5 5 (3.14000e+09) :xyz}
1124 do_test printf-2.2.10.9 {
1125 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 3.14e+9
1126 } {abc: 5 5 (3.14e+09) :xyz}
1127 do_test printf-2.2.11.2 {
1128 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -4.72732e+88
1129 } {abc: (-4.72732e+88) :xyz}
1130 do_test printf-2.2.11.3 {
1131 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -4.72732e+88
1132 } {abc: (-4.7273e+88) :xyz}
1133 do_test printf-2.2.11.4 {
1134 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -4.72732e+88
1135 } {abc: 5 5 (-4.72732e+88) :xyz}
1136 do_test printf-2.2.11.5 {
1137 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -4.72732e+88
1138 } {abc: 5 5 (-4.72732e+88) :xyz}
1139 do_test printf-2.2.11.6 {
1140 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -4.72732e+88
1141 } {abc: 5 5 (-4.72732e+88) :xyz}
1142 do_test printf-2.2.11.8 {
1143 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -4.72732e+88
1144 } {abc: 5 5 (-4.72732e+88) :xyz}
1145 do_test printf-2.2.11.9 {
1146 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -4.72732e+88
1147 } {abc: 5 5 (-4.7273e+88) :xyz}
1148 do_test printf-2.2.12.2 {
1149 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 9.87991e+143
1150 } {abc: (9.87991e+143) :xyz}
1151 do_test printf-2.2.12.3 {
1152 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 9.87991e+143
1153 } {abc: (9.8799e+143) :xyz}
1154 do_test printf-2.2.12.4 {
1155 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 9.87991e+143
1156 } {abc: 5 5 (9.87991e+143) :xyz}
1157 do_test printf-2.2.12.5 {
1158 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 9.87991e+143
1159 } {abc: 5 5 (9.87991e+143) :xyz}
1160 do_test printf-2.2.12.6 {
1161 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 9.87991e+143
1162 } {abc: 5 5 (9.87991e+143) :xyz}
1163 do_test printf-2.2.12.8 {
1164 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 9.87991e+143
1165 } {abc: 5 5 (9.87991e+143) :xyz}
1166 do_test printf-2.2.12.9 {
1167 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 9.87991e+143
1168 } {abc: 5 5 (9.8799e+143) :xyz}
1169 do_test printf-2.2.13.1 {
1170 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -6.287291e-9
1171 } {abc: (-0.00000) :xyz}
1172 do_test printf-2.2.13.2 {
1173 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -6.287291e-9
1174 } {abc: (-6.28729e-09) :xyz}
1175 do_test printf-2.2.13.3 {
1176 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -6.287291e-9
1177 } {abc: (-6.2873e-09) :xyz}
1178 do_test printf-2.2.13.4 {
1179 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -6.287291e-9
1180 } {abc: 5 5 (-6.28729e-09) :xyz}
1181 do_test printf-2.2.13.5 {
1182 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -6.287291e-9
1183 } {abc: 5 5 (-6.28729e-09) :xyz}
1184 do_test printf-2.2.13.6 {
1185 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -6.287291e-9
1186 } {abc: 5 5 (-6.28729e-09) :xyz}
1187 do_test printf-2.2.13.7 {
1188 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -6.287291e-9
1189 } {abc: 5 5 (-0.00000) :xyz}
1190 do_test printf-2.2.13.8 {
1191 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -6.287291e-9
1192 } {abc: 5 5 (-6.28729e-09) :xyz}
1193 do_test printf-2.2.13.9 {
1194 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -6.287291e-9
1195 } {abc: 5 5 (-6.2873e-09) :xyz}
1196 do_test printf-2.2.14.1 {
1197 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 3.38826392e-110
1198 } {abc: (0.00000) :xyz}
1199 do_test printf-2.2.14.2 {
1200 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 3.38826392e-110
1201 } {abc: (3.38826e-110) :xyz}
1202 do_test printf-2.2.14.3 {
1203 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 3.38826392e-110
1204 } {abc: (3.3883e-110) :xyz}
1205 do_test printf-2.2.14.4 {
1206 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 3.38826392e-110
1207 } {abc: 5 5 (3.38826e-110) :xyz}
1208 do_test printf-2.2.14.5 {
1209 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 3.38826392e-110
1210 } {abc: 5 5 (3.38826e-110) :xyz}
1211 do_test printf-2.2.14.6 {
1212 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 3.38826392e-110
1213 } {abc: 5 5 (3.38826e-110) :xyz}
1214 do_test printf-2.2.14.7 {
1215 sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 3.38826392e-110
1216 } {abc: 5 5 (0.00000) :xyz}
1217 do_test printf-2.2.14.8 {
1218 sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 3.38826392e-110
1219 } {abc: 5 5 (3.38826e-110) :xyz}
1220 do_test printf-2.2.14.9 {
1221 sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 3.38826392e-110
1222 } {abc: 5 5 (3.3883e-110) :xyz}
1223 do_test printf-2.3.1.1 {
1224 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 0.001
1225 } {abc: (0.0010000000) :xyz}
1226 do_test printf-2.3.1.2 {
1227 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 0.001
1228 } {abc: (1.0000000000e-03) :xyz}
1229 do_test printf-2.3.1.3 {
1230 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 0.001
1231 } {abc: ( 0.001) :xyz}
1232 do_test printf-2.3.1.4 {
1233 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 0.001
1234 } {abc: 10 10 (0.001) :xyz}
1235 do_test printf-2.3.1.5 {
1236 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 0.001
1237 } {abc: 10 10 (0.00100000) :xyz}
1238 do_test printf-2.3.1.6 {
1239 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 0.001
1240 } {abc: 10 10 (000000.001) :xyz}
1241 do_test printf-2.3.1.7 {
1242 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 0.001
1243 } {abc: 10 10 (0.0010000000) :xyz}
1244 do_test printf-2.3.1.8 {
1245 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 0.001
1246 } {abc: 10 10 (1.0000000000e-03) :xyz}
1247 do_test printf-2.3.1.9 {
1248 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 0.001
1249 } {abc: 10 10 ( 0.001) :xyz}
1250 do_test printf-2.3.2.1 {
1251 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 1.0e-20
1252 } {abc: (0.0000000000) :xyz}
1253 do_test printf-2.3.2.2 {
1254 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 1.0e-20
1255 } {abc: (1.0000000000e-20) :xyz}
1256 do_test printf-2.3.2.3 {
1257 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 1.0e-20
1258 } {abc: ( 1e-20) :xyz}
1259 do_test printf-2.3.2.4 {
1260 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 1.0e-20
1261 } {abc: 10 10 (1e-20) :xyz}
1262 do_test printf-2.3.2.5 {
1263 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 1.0e-20
1264 } {abc: 10 10 (1.00000e-20) :xyz}
1265 do_test printf-2.3.2.6 {
1266 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 1.0e-20
1267 } {abc: 10 10 (000001e-20) :xyz}
1268 do_test printf-2.3.2.7 {
1269 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 1.0e-20
1270 } {abc: 10 10 (0.0000000000) :xyz}
1271 do_test printf-2.3.2.8 {
1272 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 1.0e-20
1273 } {abc: 10 10 (1.0000000000e-20) :xyz}
1274 do_test printf-2.3.2.9 {
1275 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 1.0e-20
1276 } {abc: 10 10 ( 1e-20) :xyz}
1277 do_test printf-2.3.3.1 {
1278 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 1.0
1279 } {abc: (1.0000000000) :xyz}
1280 do_test printf-2.3.3.2 {
1281 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 1.0
1282 } {abc: (1.0000000000e+00) :xyz}
1283 do_test printf-2.3.3.3 {
1284 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 1.0
1286 do_test printf-2.3.3.4 {
1287 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 1.0
1288 } {abc: 10 10 (1) :xyz}
1289 do_test printf-2.3.3.5 {
1290 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 1.0
1291 } {abc: 10 10 (1.00000) :xyz}
1292 do_test printf-2.3.3.6 {
1293 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 1.0
1294 } {abc: 10 10 (0000000001) :xyz}
1295 do_test printf-2.3.3.7 {
1296 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 1.0
1297 } {abc: 10 10 (1.0000000000) :xyz}
1298 do_test printf-2.3.3.8 {
1299 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 1.0
1300 } {abc: 10 10 (1.0000000000e+00) :xyz}
1301 do_test printf-2.3.3.9 {
1302 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 1.0
1303 } {abc: 10 10 ( 1) :xyz}
1304 do_test printf-2.3.4.1 {
1305 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 0.0
1306 } {abc: (0.0000000000) :xyz}
1307 do_test printf-2.3.4.2 {
1308 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 0.0
1309 } {abc: (0.0000000000e+00) :xyz}
1310 do_test printf-2.3.4.3 {
1311 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 0.0
1313 do_test printf-2.3.4.4 {
1314 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 0.0
1315 } {abc: 10 10 (0) :xyz}
1316 do_test printf-2.3.4.5 {
1317 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 0.0
1318 } {abc: 10 10 (0.00000) :xyz}
1319 do_test printf-2.3.4.6 {
1320 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 0.0
1321 } {abc: 10 10 (0000000000) :xyz}
1322 do_test printf-2.3.4.7 {
1323 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 0.0
1324 } {abc: 10 10 (0.0000000000) :xyz}
1325 do_test printf-2.3.4.8 {
1326 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 0.0
1327 } {abc: 10 10 (0.0000000000e+00) :xyz}
1328 do_test printf-2.3.4.9 {
1329 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 0.0
1330 } {abc: 10 10 ( 0) :xyz}
1331 do_test printf-2.3.5.1 {
1332 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 100.0
1333 } {abc: (100.0000000000) :xyz}
1334 do_test printf-2.3.5.2 {
1335 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 100.0
1336 } {abc: (1.0000000000e+02) :xyz}
1337 do_test printf-2.3.5.3 {
1338 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 100.0
1339 } {abc: ( 100) :xyz}
1340 do_test printf-2.3.5.4 {
1341 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 100.0
1342 } {abc: 10 10 (100) :xyz}
1343 do_test printf-2.3.5.5 {
1344 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 100.0
1345 } {abc: 10 10 (100.000) :xyz}
1346 do_test printf-2.3.5.6 {
1347 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 100.0
1348 } {abc: 10 10 (0000000100) :xyz}
1349 do_test printf-2.3.5.7 {
1350 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 100.0
1351 } {abc: 10 10 (100.0000000000) :xyz}
1352 do_test printf-2.3.5.8 {
1353 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 100.0
1354 } {abc: 10 10 (1.0000000000e+02) :xyz}
1355 do_test printf-2.3.5.9 {
1356 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 100.0
1357 } {abc: 10 10 ( 100) :xyz}
1358 do_test printf-2.3.6.1 {
1359 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 9.99999
1360 } {abc: (9.9999900000) :xyz}
1361 do_test printf-2.3.6.2 {
1362 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 9.99999
1363 } {abc: (9.9999900000e+00) :xyz}
1364 do_test printf-2.3.6.3 {
1365 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 9.99999
1366 } {abc: ( 9.99999) :xyz}
1367 do_test printf-2.3.6.4 {
1368 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 9.99999
1369 } {abc: 10 10 (9.99999) :xyz}
1370 do_test printf-2.3.6.5 {
1371 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 9.99999
1372 } {abc: 10 10 (9.99999) :xyz}
1373 do_test printf-2.3.6.6 {
1374 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 9.99999
1375 } {abc: 10 10 (0009.99999) :xyz}
1376 do_test printf-2.3.6.7 {
1377 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 9.99999
1378 } {abc: 10 10 (9.9999900000) :xyz}
1379 do_test printf-2.3.6.8 {
1380 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 9.99999
1381 } {abc: 10 10 (9.9999900000e+00) :xyz}
1382 do_test printf-2.3.6.9 {
1383 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 9.99999
1384 } {abc: 10 10 ( 9.99999) :xyz}
1385 do_test printf-2.3.7.1 {
1386 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 -0.00543
1387 } {abc: (-0.0054300000) :xyz}
1388 do_test printf-2.3.7.2 {
1389 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 -0.00543
1390 } {abc: (-5.4300000000e-03) :xyz}
1391 do_test printf-2.3.7.3 {
1392 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 -0.00543
1393 } {abc: ( -0.00543) :xyz}
1394 do_test printf-2.3.7.4 {
1395 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 -0.00543
1396 } {abc: 10 10 (-0.00543) :xyz}
1397 do_test printf-2.3.7.5 {
1398 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 -0.00543
1399 } {abc: 10 10 (-0.00543000) :xyz}
1400 do_test printf-2.3.7.6 {
1401 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 -0.00543
1402 } {abc: 10 10 (-000.00543) :xyz}
1403 do_test printf-2.3.7.7 {
1404 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 -0.00543
1405 } {abc: 10 10 (-0.0054300000) :xyz}
1406 do_test printf-2.3.7.8 {
1407 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 -0.00543
1408 } {abc: 10 10 (-5.4300000000e-03) :xyz}
1409 do_test printf-2.3.7.9 {
1410 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 -0.00543
1411 } {abc: 10 10 ( -0.00543) :xyz}
1412 do_test printf-2.3.8.1 {
1413 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 -1.0
1414 } {abc: (-1.0000000000) :xyz}
1415 do_test printf-2.3.8.2 {
1416 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 -1.0
1417 } {abc: (-1.0000000000e+00) :xyz}
1418 do_test printf-2.3.8.3 {
1419 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 -1.0
1421 do_test printf-2.3.8.4 {
1422 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 -1.0
1423 } {abc: 10 10 (-1) :xyz}
1424 do_test printf-2.3.8.5 {
1425 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 -1.0
1426 } {abc: 10 10 (-1.00000) :xyz}
1427 do_test printf-2.3.8.6 {
1428 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 -1.0
1429 } {abc: 10 10 (-000000001) :xyz}
1430 do_test printf-2.3.8.7 {
1431 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 -1.0
1432 } {abc: 10 10 (-1.0000000000) :xyz}
1433 do_test printf-2.3.8.8 {
1434 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 -1.0
1435 } {abc: 10 10 (-1.0000000000e+00) :xyz}
1436 do_test printf-2.3.8.9 {
1437 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 -1.0
1438 } {abc: 10 10 ( -1) :xyz}
1439 do_test printf-2.3.9.1 {
1440 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 -99.99999
1441 } {abc: (-99.9999900000) :xyz}
1442 do_test printf-2.3.9.2 {
1443 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 -99.99999
1444 } {abc: (-9.9999990000e+01) :xyz}
1445 do_test printf-2.3.9.3 {
1446 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 -99.99999
1447 } {abc: ( -99.99999) :xyz}
1448 do_test printf-2.3.9.4 {
1449 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 -99.99999
1450 } {abc: 10 10 (-100) :xyz}
1451 do_test printf-2.3.9.5 {
1452 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 -99.99999
1453 } {abc: 10 10 (-100.000) :xyz}
1454 do_test printf-2.3.9.6 {
1455 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 -99.99999
1456 } {abc: 10 10 (-000000100) :xyz}
1457 do_test printf-2.3.9.7 {
1458 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 -99.99999
1459 } {abc: 10 10 (-99.9999900000) :xyz}
1460 do_test printf-2.3.9.8 {
1461 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 -99.99999
1462 } {abc: 10 10 (-9.9999990000e+01) :xyz}
1463 do_test printf-2.3.9.9 {
1464 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 -99.99999
1465 } {abc: 10 10 ( -99.99999) :xyz}
1466 do_test printf-2.3.10.1 {
1467 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 3.14e+9
1468 } {abc: (3140000000.0000000000) :xyz}
1469 do_test printf-2.3.10.2 {
1470 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 3.14e+9
1471 } {abc: (3.1400000000e+09) :xyz}
1472 do_test printf-2.3.10.3 {
1473 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 3.14e+9
1474 } {abc: (3140000000) :xyz}
1475 do_test printf-2.3.10.4 {
1476 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 3.14e+9
1477 } {abc: 10 10 (3.14e+09) :xyz}
1478 do_test printf-2.3.10.5 {
1479 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 3.14e+9
1480 } {abc: 10 10 (3.14000e+09) :xyz}
1481 do_test printf-2.3.10.6 {
1482 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 3.14e+9
1483 } {abc: 10 10 (003.14e+09) :xyz}
1484 do_test printf-2.3.10.7 {
1485 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 3.14e+9
1486 } {abc: 10 10 (3140000000.0000000000) :xyz}
1487 do_test printf-2.3.10.8 {
1488 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 3.14e+9
1489 } {abc: 10 10 (3.1400000000e+09) :xyz}
1490 do_test printf-2.3.10.9 {
1491 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 3.14e+9
1492 } {abc: 10 10 (3140000000) :xyz}
1493 do_test printf-2.3.11.2 {
1494 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 -4.72732e+88
1495 } {abc: (-4.7273200000e+88) :xyz}
1496 do_test printf-2.3.11.3 {
1497 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 -4.72732e+88
1498 } {abc: (-4.72732e+88) :xyz}
1499 do_test printf-2.3.11.4 {
1500 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 -4.72732e+88
1501 } {abc: 10 10 (-4.72732e+88) :xyz}
1502 do_test printf-2.3.11.5 {
1503 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 -4.72732e+88
1504 } {abc: 10 10 (-4.72732e+88) :xyz}
1505 do_test printf-2.3.11.6 {
1506 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 -4.72732e+88
1507 } {abc: 10 10 (-4.72732e+88) :xyz}
1508 do_test printf-2.3.11.8 {
1509 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 -4.72732e+88
1510 } {abc: 10 10 (-4.7273200000e+88) :xyz}
1511 do_test printf-2.3.11.9 {
1512 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 -4.72732e+88
1513 } {abc: 10 10 (-4.72732e+88) :xyz}
1514 do_test printf-2.3.12.2 {
1515 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 9.87991e+143
1516 } {abc: (9.8799100000e+143) :xyz}
1517 do_test printf-2.3.12.3 {
1518 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 9.87991e+143
1519 } {abc: (9.87991e+143) :xyz}
1520 do_test printf-2.3.12.4 {
1521 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 9.87991e+143
1522 } {abc: 10 10 (9.87991e+143) :xyz}
1523 do_test printf-2.3.12.5 {
1524 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 9.87991e+143
1525 } {abc: 10 10 (9.87991e+143) :xyz}
1526 do_test printf-2.3.12.6 {
1527 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 9.87991e+143
1528 } {abc: 10 10 (9.87991e+143) :xyz}
1529 do_test printf-2.3.12.8 {
1530 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 9.87991e+143
1531 } {abc: 10 10 (9.8799100000e+143) :xyz}
1532 do_test printf-2.3.12.9 {
1533 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 9.87991e+143
1534 } {abc: 10 10 (9.87991e+143) :xyz}
1535 do_test printf-2.3.13.1 {
1536 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 -6.287291e-9
1537 } {abc: (-0.0000000063) :xyz}
1538 do_test printf-2.3.13.2 {
1539 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 -6.287291e-9
1540 } {abc: (-6.2872910000e-09) :xyz}
1541 do_test printf-2.3.13.3 {
1542 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 -6.287291e-9
1543 } {abc: (-6.287291e-09) :xyz}
1544 do_test printf-2.3.13.4 {
1545 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 -6.287291e-9
1546 } {abc: 10 10 (-6.28729e-09) :xyz}
1547 do_test printf-2.3.13.5 {
1548 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 -6.287291e-9
1549 } {abc: 10 10 (-6.28729e-09) :xyz}
1550 do_test printf-2.3.13.6 {
1551 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 -6.287291e-9
1552 } {abc: 10 10 (-6.28729e-09) :xyz}
1553 do_test printf-2.3.13.7 {
1554 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 -6.287291e-9
1555 } {abc: 10 10 (-0.0000000063) :xyz}
1556 do_test printf-2.3.13.8 {
1557 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 -6.287291e-9
1558 } {abc: 10 10 (-6.2872910000e-09) :xyz}
1559 do_test printf-2.3.13.9 {
1560 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 -6.287291e-9
1561 } {abc: 10 10 (-6.287291e-09) :xyz}
1562 do_test printf-2.3.14.1 {
1563 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 3.38826392e-110
1564 } {abc: (0.0000000000) :xyz}
1565 do_test printf-2.3.14.2 {
1566 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 3.38826392e-110
1567 } {abc: (3.3882639200e-110) :xyz}
1568 do_test printf-2.3.14.3 {
1569 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 3.38826392e-110
1570 } {abc: (3.38826392e-110) :xyz}
1571 do_test printf-2.3.14.4 {
1572 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 3.38826392e-110
1573 } {abc: 10 10 (3.38826e-110) :xyz}
1574 do_test printf-2.3.14.5 {
1575 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 3.38826392e-110
1576 } {abc: 10 10 (3.38826e-110) :xyz}
1577 do_test printf-2.3.14.6 {
1578 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 3.38826392e-110
1579 } {abc: 10 10 (3.38826e-110) :xyz}
1580 do_test printf-2.3.14.7 {
1581 sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 3.38826392e-110
1582 } {abc: 10 10 (0.0000000000) :xyz}
1583 do_test printf-2.3.14.8 {
1584 sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 3.38826392e-110
1585 } {abc: 10 10 (3.3882639200e-110) :xyz}
1586 do_test printf-2.3.14.9 {
1587 sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 3.38826392e-110
1588 } {abc: 10 10 (3.38826392e-110) :xyz}
1589 do_test printf-2.4.1.1 {
1590 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 0.001
1591 } {abc: ( 0.00100) :xyz}
1592 do_test printf-2.4.1.2 {
1593 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 0.001
1594 } {abc: (1.00000e-03) :xyz}
1595 do_test printf-2.4.1.3 {
1596 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 0.001
1597 } {abc: ( 0.001) :xyz}
1598 do_test printf-2.4.1.4 {
1599 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 0.001
1600 } {abc: 10 5 (0.001) :xyz}
1601 do_test printf-2.4.1.5 {
1602 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 0.001
1603 } {abc: 10 5 (0.00100000) :xyz}
1604 do_test printf-2.4.1.6 {
1605 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 0.001
1606 } {abc: 10 5 (000000.001) :xyz}
1607 do_test printf-2.4.1.7 {
1608 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 0.001
1609 } {abc: 10 5 ( 0.00100) :xyz}
1610 do_test printf-2.4.1.8 {
1611 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 0.001
1612 } {abc: 10 5 (1.00000e-03) :xyz}
1613 do_test printf-2.4.1.9 {
1614 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 0.001
1615 } {abc: 10 5 ( 0.001) :xyz}
1616 do_test printf-2.4.2.1 {
1617 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 1.0e-20
1618 } {abc: ( 0.00000) :xyz}
1619 do_test printf-2.4.2.2 {
1620 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 1.0e-20
1621 } {abc: (1.00000e-20) :xyz}
1622 do_test printf-2.4.2.3 {
1623 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 1.0e-20
1624 } {abc: ( 1e-20) :xyz}
1625 do_test printf-2.4.2.4 {
1626 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 1.0e-20
1627 } {abc: 10 5 (1e-20) :xyz}
1628 do_test printf-2.4.2.5 {
1629 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 1.0e-20
1630 } {abc: 10 5 (1.00000e-20) :xyz}
1631 do_test printf-2.4.2.6 {
1632 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 1.0e-20
1633 } {abc: 10 5 (000001e-20) :xyz}
1634 do_test printf-2.4.2.7 {
1635 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 1.0e-20
1636 } {abc: 10 5 ( 0.00000) :xyz}
1637 do_test printf-2.4.2.8 {
1638 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 1.0e-20
1639 } {abc: 10 5 (1.00000e-20) :xyz}
1640 do_test printf-2.4.2.9 {
1641 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 1.0e-20
1642 } {abc: 10 5 ( 1e-20) :xyz}
1643 do_test printf-2.4.3.1 {
1644 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 1.0
1645 } {abc: ( 1.00000) :xyz}
1646 do_test printf-2.4.3.2 {
1647 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 1.0
1648 } {abc: (1.00000e+00) :xyz}
1649 do_test printf-2.4.3.3 {
1650 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 1.0
1652 do_test printf-2.4.3.4 {
1653 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 1.0
1654 } {abc: 10 5 (1) :xyz}
1655 do_test printf-2.4.3.5 {
1656 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 1.0
1657 } {abc: 10 5 (1.00000) :xyz}
1658 do_test printf-2.4.3.6 {
1659 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 1.0
1660 } {abc: 10 5 (0000000001) :xyz}
1661 do_test printf-2.4.3.7 {
1662 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 1.0
1663 } {abc: 10 5 ( 1.00000) :xyz}
1664 do_test printf-2.4.3.8 {
1665 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 1.0
1666 } {abc: 10 5 (1.00000e+00) :xyz}
1667 do_test printf-2.4.3.9 {
1668 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 1.0
1669 } {abc: 10 5 ( 1) :xyz}
1670 do_test printf-2.4.4.1 {
1671 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 0.0
1672 } {abc: ( 0.00000) :xyz}
1673 do_test printf-2.4.4.2 {
1674 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 0.0
1675 } {abc: (0.00000e+00) :xyz}
1676 do_test printf-2.4.4.3 {
1677 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 0.0
1679 do_test printf-2.4.4.4 {
1680 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 0.0
1681 } {abc: 10 5 (0) :xyz}
1682 do_test printf-2.4.4.5 {
1683 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 0.0
1684 } {abc: 10 5 (0.00000) :xyz}
1685 do_test printf-2.4.4.6 {
1686 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 0.0
1687 } {abc: 10 5 (0000000000) :xyz}
1688 do_test printf-2.4.4.7 {
1689 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 0.0
1690 } {abc: 10 5 ( 0.00000) :xyz}
1691 do_test printf-2.4.4.8 {
1692 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 0.0
1693 } {abc: 10 5 (0.00000e+00) :xyz}
1694 do_test printf-2.4.4.9 {
1695 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 0.0
1696 } {abc: 10 5 ( 0) :xyz}
1697 do_test printf-2.4.5.1 {
1698 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 100.0
1699 } {abc: ( 100.00000) :xyz}
1700 do_test printf-2.4.5.2 {
1701 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 100.0
1702 } {abc: (1.00000e+02) :xyz}
1703 do_test printf-2.4.5.3 {
1704 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 100.0
1705 } {abc: ( 100) :xyz}
1706 do_test printf-2.4.5.4 {
1707 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 100.0
1708 } {abc: 10 5 (100) :xyz}
1709 do_test printf-2.4.5.5 {
1710 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 100.0
1711 } {abc: 10 5 (100.000) :xyz}
1712 do_test printf-2.4.5.6 {
1713 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 100.0
1714 } {abc: 10 5 (0000000100) :xyz}
1715 do_test printf-2.4.5.7 {
1716 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 100.0
1717 } {abc: 10 5 ( 100.00000) :xyz}
1718 do_test printf-2.4.5.8 {
1719 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 100.0
1720 } {abc: 10 5 (1.00000e+02) :xyz}
1721 do_test printf-2.4.5.9 {
1722 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 100.0
1723 } {abc: 10 5 ( 100) :xyz}
1724 do_test printf-2.4.6.1 {
1725 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 9.99999
1726 } {abc: ( 9.99999) :xyz}
1727 do_test printf-2.4.6.2 {
1728 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 9.99999
1729 } {abc: (9.99999e+00) :xyz}
1730 do_test printf-2.4.6.3 {
1731 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 9.99999
1733 do_test printf-2.4.6.4 {
1734 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 9.99999
1735 } {abc: 10 5 (9.99999) :xyz}
1736 do_test printf-2.4.6.5 {
1737 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 9.99999
1738 } {abc: 10 5 (9.99999) :xyz}
1739 do_test printf-2.4.6.6 {
1740 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 9.99999
1741 } {abc: 10 5 (0009.99999) :xyz}
1742 do_test printf-2.4.6.7 {
1743 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 9.99999
1744 } {abc: 10 5 ( 9.99999) :xyz}
1745 do_test printf-2.4.6.8 {
1746 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 9.99999
1747 } {abc: 10 5 (9.99999e+00) :xyz}
1748 do_test printf-2.4.6.9 {
1749 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 9.99999
1750 } {abc: 10 5 ( 10) :xyz}
1751 do_test printf-2.4.7.1 {
1752 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 -0.00543
1753 } {abc: ( -0.00543) :xyz}
1754 do_test printf-2.4.7.2 {
1755 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 -0.00543
1756 } {abc: (-5.43000e-03) :xyz}
1757 do_test printf-2.4.7.3 {
1758 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 -0.00543
1759 } {abc: ( -0.00543) :xyz}
1760 do_test printf-2.4.7.4 {
1761 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 -0.00543
1762 } {abc: 10 5 (-0.00543) :xyz}
1763 do_test printf-2.4.7.5 {
1764 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 -0.00543
1765 } {abc: 10 5 (-0.00543000) :xyz}
1766 do_test printf-2.4.7.6 {
1767 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 -0.00543
1768 } {abc: 10 5 (-000.00543) :xyz}
1769 do_test printf-2.4.7.7 {
1770 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 -0.00543
1771 } {abc: 10 5 ( -0.00543) :xyz}
1772 do_test printf-2.4.7.8 {
1773 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 -0.00543
1774 } {abc: 10 5 (-5.43000e-03) :xyz}
1775 do_test printf-2.4.7.9 {
1776 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 -0.00543
1777 } {abc: 10 5 ( -0.00543) :xyz}
1778 do_test printf-2.4.8.1 {
1779 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 -1.0
1780 } {abc: ( -1.00000) :xyz}
1781 do_test printf-2.4.8.2 {
1782 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 -1.0
1783 } {abc: (-1.00000e+00) :xyz}
1784 do_test printf-2.4.8.3 {
1785 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 -1.0
1787 do_test printf-2.4.8.4 {
1788 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 -1.0
1789 } {abc: 10 5 (-1) :xyz}
1790 do_test printf-2.4.8.5 {
1791 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 -1.0
1792 } {abc: 10 5 (-1.00000) :xyz}
1793 do_test printf-2.4.8.6 {
1794 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 -1.0
1795 } {abc: 10 5 (-000000001) :xyz}
1796 do_test printf-2.4.8.7 {
1797 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 -1.0
1798 } {abc: 10 5 ( -1.00000) :xyz}
1799 do_test printf-2.4.8.8 {
1800 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 -1.0
1801 } {abc: 10 5 (-1.00000e+00) :xyz}
1802 do_test printf-2.4.8.9 {
1803 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 -1.0
1804 } {abc: 10 5 ( -1) :xyz}
1805 do_test printf-2.4.9.1 {
1806 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 -99.99999
1807 } {abc: ( -99.99999) :xyz}
1808 do_test printf-2.4.9.2 {
1809 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 -99.99999
1810 } {abc: (-1.00000e+02) :xyz}
1811 do_test printf-2.4.9.3 {
1812 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 -99.99999
1813 } {abc: ( -100) :xyz}
1814 do_test printf-2.4.9.4 {
1815 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 -99.99999
1816 } {abc: 10 5 (-100) :xyz}
1817 do_test printf-2.4.9.5 {
1818 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 -99.99999
1819 } {abc: 10 5 (-100.000) :xyz}
1820 do_test printf-2.4.9.6 {
1821 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 -99.99999
1822 } {abc: 10 5 (-000000100) :xyz}
1823 do_test printf-2.4.9.7 {
1824 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 -99.99999
1825 } {abc: 10 5 ( -99.99999) :xyz}
1826 do_test printf-2.4.9.8 {
1827 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 -99.99999
1828 } {abc: 10 5 (-1.00000e+02) :xyz}
1829 do_test printf-2.4.9.9 {
1830 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 -99.99999
1831 } {abc: 10 5 ( -100) :xyz}
1832 do_test printf-2.4.10.1 {
1833 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 3.14e+9
1834 } {abc: (3140000000.00000) :xyz}
1835 do_test printf-2.4.10.2 {
1836 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 3.14e+9
1837 } {abc: (3.14000e+09) :xyz}
1838 do_test printf-2.4.10.3 {
1839 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 3.14e+9
1840 } {abc: ( 3.14e+09) :xyz}
1841 do_test printf-2.4.10.4 {
1842 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 3.14e+9
1843 } {abc: 10 5 (3.14e+09) :xyz}
1844 do_test printf-2.4.10.5 {
1845 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 3.14e+9
1846 } {abc: 10 5 (3.14000e+09) :xyz}
1847 do_test printf-2.4.10.6 {
1848 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 3.14e+9
1849 } {abc: 10 5 (003.14e+09) :xyz}
1850 do_test printf-2.4.10.7 {
1851 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 3.14e+9
1852 } {abc: 10 5 (3140000000.00000) :xyz}
1853 do_test printf-2.4.10.8 {
1854 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 3.14e+9
1855 } {abc: 10 5 (3.14000e+09) :xyz}
1856 do_test printf-2.4.10.9 {
1857 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 3.14e+9
1858 } {abc: 10 5 ( 3.14e+09) :xyz}
1859 do_test printf-2.4.11.2 {
1860 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 -4.72732e+88
1861 } {abc: (-4.72732e+88) :xyz}
1862 do_test printf-2.4.11.3 {
1863 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 -4.72732e+88
1864 } {abc: (-4.7273e+88) :xyz}
1865 do_test printf-2.4.11.4 {
1866 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 -4.72732e+88
1867 } {abc: 10 5 (-4.72732e+88) :xyz}
1868 do_test printf-2.4.11.5 {
1869 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 -4.72732e+88
1870 } {abc: 10 5 (-4.72732e+88) :xyz}
1871 do_test printf-2.4.11.6 {
1872 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 -4.72732e+88
1873 } {abc: 10 5 (-4.72732e+88) :xyz}
1874 do_test printf-2.4.11.8 {
1875 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 -4.72732e+88
1876 } {abc: 10 5 (-4.72732e+88) :xyz}
1877 do_test printf-2.4.11.9 {
1878 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 -4.72732e+88
1879 } {abc: 10 5 (-4.7273e+88) :xyz}
1880 do_test printf-2.4.12.2 {
1881 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 9.87991e+143
1882 } {abc: (9.87991e+143) :xyz}
1883 do_test printf-2.4.12.3 {
1884 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 9.87991e+143
1885 } {abc: (9.8799e+143) :xyz}
1886 do_test printf-2.4.12.4 {
1887 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 9.87991e+143
1888 } {abc: 10 5 (9.87991e+143) :xyz}
1889 do_test printf-2.4.12.5 {
1890 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 9.87991e+143
1891 } {abc: 10 5 (9.87991e+143) :xyz}
1892 do_test printf-2.4.12.6 {
1893 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 9.87991e+143
1894 } {abc: 10 5 (9.87991e+143) :xyz}
1895 do_test printf-2.4.12.8 {
1896 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 9.87991e+143
1897 } {abc: 10 5 (9.87991e+143) :xyz}
1898 do_test printf-2.4.12.9 {
1899 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 9.87991e+143
1900 } {abc: 10 5 (9.8799e+143) :xyz}
1901 do_test printf-2.4.13.1 {
1902 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 -6.287291e-9
1903 } {abc: ( -0.00000) :xyz}
1904 do_test printf-2.4.13.2 {
1905 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 -6.287291e-9
1906 } {abc: (-6.28729e-09) :xyz}
1907 do_test printf-2.4.13.3 {
1908 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 -6.287291e-9
1909 } {abc: (-6.2873e-09) :xyz}
1910 do_test printf-2.4.13.4 {
1911 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 -6.287291e-9
1912 } {abc: 10 5 (-6.28729e-09) :xyz}
1913 do_test printf-2.4.13.5 {
1914 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 -6.287291e-9
1915 } {abc: 10 5 (-6.28729e-09) :xyz}
1916 do_test printf-2.4.13.6 {
1917 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 -6.287291e-9
1918 } {abc: 10 5 (-6.28729e-09) :xyz}
1919 do_test printf-2.4.13.7 {
1920 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 -6.287291e-9
1921 } {abc: 10 5 ( -0.00000) :xyz}
1922 do_test printf-2.4.13.8 {
1923 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 -6.287291e-9
1924 } {abc: 10 5 (-6.28729e-09) :xyz}
1925 do_test printf-2.4.13.9 {
1926 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 -6.287291e-9
1927 } {abc: 10 5 (-6.2873e-09) :xyz}
1928 do_test printf-2.4.14.1 {
1929 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 5 3.38826392e-110
1930 } {abc: ( 0.00000) :xyz}
1931 do_test printf-2.4.14.2 {
1932 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 5 3.38826392e-110
1933 } {abc: (3.38826e-110) :xyz}
1934 do_test printf-2.4.14.3 {
1935 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 5 3.38826392e-110
1936 } {abc: (3.3883e-110) :xyz}
1937 do_test printf-2.4.14.4 {
1938 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 5 3.38826392e-110
1939 } {abc: 10 5 (3.38826e-110) :xyz}
1940 do_test printf-2.4.14.5 {
1941 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 5 3.38826392e-110
1942 } {abc: 10 5 (3.38826e-110) :xyz}
1943 do_test printf-2.4.14.6 {
1944 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 5 3.38826392e-110
1945 } {abc: 10 5 (3.38826e-110) :xyz}
1946 do_test printf-2.4.14.7 {
1947 sqlite3_mprintf_double {abc: %d %d (%10.5f) :xyz} 10 5 3.38826392e-110
1948 } {abc: 10 5 ( 0.00000) :xyz}
1949 do_test printf-2.4.14.8 {
1950 sqlite3_mprintf_double {abc: %d %d (%10.5e) :xyz} 10 5 3.38826392e-110
1951 } {abc: 10 5 (3.38826e-110) :xyz}
1952 do_test printf-2.4.14.9 {
1953 sqlite3_mprintf_double {abc: %d %d (%10.5g) :xyz} 10 5 3.38826392e-110
1954 } {abc: 10 5 (3.3883e-110) :xyz}
1955 do_test printf-2.5.1.1 {
1956 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 0.001
1957 } {abc: (0.00) :xyz}
1958 do_test printf-2.5.1.2 {
1959 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 0.001
1960 } {abc: (1.00e-03) :xyz}
1961 do_test printf-2.5.1.3 {
1962 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 0.001
1963 } {abc: (0.001) :xyz}
1964 do_test printf-2.5.1.4 {
1965 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 0.001
1966 } {abc: 2 2 (0.001) :xyz}
1967 do_test printf-2.5.1.5 {
1968 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 0.001
1969 } {abc: 2 2 (0.00100000) :xyz}
1970 do_test printf-2.5.1.6 {
1971 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 0.001
1972 } {abc: 2 2 (000000.001) :xyz}
1973 do_test printf-2.5.1.7 {
1974 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 0.001
1975 } {abc: 2 2 (0.00) :xyz}
1976 do_test printf-2.5.1.8 {
1977 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 0.001
1978 } {abc: 2 2 (1.00e-03) :xyz}
1979 do_test printf-2.5.1.9 {
1980 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 0.001
1981 } {abc: 2 2 (0.001) :xyz}
1982 do_test printf-2.5.2.1 {
1983 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 1.0e-20
1984 } {abc: (0.00) :xyz}
1985 do_test printf-2.5.2.2 {
1986 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 1.0e-20
1987 } {abc: (1.00e-20) :xyz}
1988 do_test printf-2.5.2.3 {
1989 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 1.0e-20
1990 } {abc: (1e-20) :xyz}
1991 do_test printf-2.5.2.4 {
1992 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 1.0e-20
1993 } {abc: 2 2 (1e-20) :xyz}
1994 do_test printf-2.5.2.5 {
1995 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 1.0e-20
1996 } {abc: 2 2 (1.00000e-20) :xyz}
1997 do_test printf-2.5.2.6 {
1998 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 1.0e-20
1999 } {abc: 2 2 (000001e-20) :xyz}
2000 do_test printf-2.5.2.7 {
2001 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 1.0e-20
2002 } {abc: 2 2 (0.00) :xyz}
2003 do_test printf-2.5.2.8 {
2004 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 1.0e-20
2005 } {abc: 2 2 (1.00e-20) :xyz}
2006 do_test printf-2.5.2.9 {
2007 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 1.0e-20
2008 } {abc: 2 2 (1e-20) :xyz}
2009 do_test printf-2.5.3.1 {
2010 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 1.0
2011 } {abc: (1.00) :xyz}
2012 do_test printf-2.5.3.2 {
2013 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 1.0
2014 } {abc: (1.00e+00) :xyz}
2015 do_test printf-2.5.3.3 {
2016 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 1.0
2018 do_test printf-2.5.3.4 {
2019 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 1.0
2020 } {abc: 2 2 (1) :xyz}
2021 do_test printf-2.5.3.5 {
2022 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 1.0
2023 } {abc: 2 2 (1.00000) :xyz}
2024 do_test printf-2.5.3.6 {
2025 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 1.0
2026 } {abc: 2 2 (0000000001) :xyz}
2027 do_test printf-2.5.3.7 {
2028 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 1.0
2029 } {abc: 2 2 (1.00) :xyz}
2030 do_test printf-2.5.3.8 {
2031 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 1.0
2032 } {abc: 2 2 (1.00e+00) :xyz}
2033 do_test printf-2.5.3.9 {
2034 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 1.0
2035 } {abc: 2 2 ( 1) :xyz}
2036 do_test printf-2.5.4.1 {
2037 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 0.0
2038 } {abc: (0.00) :xyz}
2039 do_test printf-2.5.4.2 {
2040 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 0.0
2041 } {abc: (0.00e+00) :xyz}
2042 do_test printf-2.5.4.3 {
2043 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 0.0
2045 do_test printf-2.5.4.4 {
2046 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 0.0
2047 } {abc: 2 2 (0) :xyz}
2048 do_test printf-2.5.4.5 {
2049 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 0.0
2050 } {abc: 2 2 (0.00000) :xyz}
2051 do_test printf-2.5.4.6 {
2052 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 0.0
2053 } {abc: 2 2 (0000000000) :xyz}
2054 do_test printf-2.5.4.7 {
2055 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 0.0
2056 } {abc: 2 2 (0.00) :xyz}
2057 do_test printf-2.5.4.8 {
2058 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 0.0
2059 } {abc: 2 2 (0.00e+00) :xyz}
2060 do_test printf-2.5.4.9 {
2061 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 0.0
2062 } {abc: 2 2 ( 0) :xyz}
2063 do_test printf-2.5.5.1 {
2064 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 100.0
2065 } {abc: (100.00) :xyz}
2066 do_test printf-2.5.5.2 {
2067 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 100.0
2068 } {abc: (1.00e+02) :xyz}
2069 do_test printf-2.5.5.3 {
2070 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 100.0
2071 } {abc: (1e+02) :xyz}
2072 do_test printf-2.5.5.4 {
2073 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 100.0
2074 } {abc: 2 2 (100) :xyz}
2075 do_test printf-2.5.5.5 {
2076 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 100.0
2077 } {abc: 2 2 (100.000) :xyz}
2078 do_test printf-2.5.5.6 {
2079 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 100.0
2080 } {abc: 2 2 (0000000100) :xyz}
2081 do_test printf-2.5.5.7 {
2082 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 100.0
2083 } {abc: 2 2 (100.00) :xyz}
2084 do_test printf-2.5.5.8 {
2085 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 100.0
2086 } {abc: 2 2 (1.00e+02) :xyz}
2087 do_test printf-2.5.5.9 {
2088 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 100.0
2089 } {abc: 2 2 (1e+02) :xyz}
2090 do_test printf-2.5.6.1 {
2091 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 9.99999
2092 } {abc: (10.00) :xyz}
2093 do_test printf-2.5.6.2 {
2094 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 9.99999
2095 } {abc: (1.00e+01) :xyz}
2096 do_test printf-2.5.6.3 {
2097 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 9.99999
2099 do_test printf-2.5.6.4 {
2100 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 9.99999
2101 } {abc: 2 2 (9.99999) :xyz}
2102 do_test printf-2.5.6.5 {
2103 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 9.99999
2104 } {abc: 2 2 (9.99999) :xyz}
2105 do_test printf-2.5.6.6 {
2106 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 9.99999
2107 } {abc: 2 2 (0009.99999) :xyz}
2108 do_test printf-2.5.6.7 {
2109 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 9.99999
2110 } {abc: 2 2 (10.00) :xyz}
2111 do_test printf-2.5.6.8 {
2112 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 9.99999
2113 } {abc: 2 2 (1.00e+01) :xyz}
2114 do_test printf-2.5.6.9 {
2115 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 9.99999
2116 } {abc: 2 2 (10) :xyz}
2117 do_test printf-2.5.7.1 {
2118 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 -0.00543
2119 } {abc: (-0.01) :xyz}
2120 do_test printf-2.5.7.2 {
2121 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 -0.00543
2122 } {abc: (-5.43e-03) :xyz}
2123 do_test printf-2.5.7.3 {
2124 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 -0.00543
2125 } {abc: (-0.0054) :xyz}
2126 do_test printf-2.5.7.4 {
2127 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 -0.00543
2128 } {abc: 2 2 (-0.00543) :xyz}
2129 do_test printf-2.5.7.5 {
2130 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 -0.00543
2131 } {abc: 2 2 (-0.00543000) :xyz}
2132 do_test printf-2.5.7.6 {
2133 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 -0.00543
2134 } {abc: 2 2 (-000.00543) :xyz}
2135 do_test printf-2.5.7.7 {
2136 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 -0.00543
2137 } {abc: 2 2 (-0.01) :xyz}
2138 do_test printf-2.5.7.8 {
2139 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 -0.00543
2140 } {abc: 2 2 (-5.43e-03) :xyz}
2141 do_test printf-2.5.7.9 {
2142 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 -0.00543
2143 } {abc: 2 2 (-0.0054) :xyz}
2144 do_test printf-2.5.8.1 {
2145 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 -1.0
2146 } {abc: (-1.00) :xyz}
2147 do_test printf-2.5.8.2 {
2148 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 -1.0
2149 } {abc: (-1.00e+00) :xyz}
2150 do_test printf-2.5.8.3 {
2151 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 -1.0
2153 do_test printf-2.5.8.4 {
2154 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 -1.0
2155 } {abc: 2 2 (-1) :xyz}
2156 do_test printf-2.5.8.5 {
2157 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 -1.0
2158 } {abc: 2 2 (-1.00000) :xyz}
2159 do_test printf-2.5.8.6 {
2160 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 -1.0
2161 } {abc: 2 2 (-000000001) :xyz}
2162 do_test printf-2.5.8.7 {
2163 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 -1.0
2164 } {abc: 2 2 (-1.00) :xyz}
2165 do_test printf-2.5.8.8 {
2166 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 -1.0
2167 } {abc: 2 2 (-1.00e+00) :xyz}
2168 do_test printf-2.5.8.9 {
2169 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 -1.0
2170 } {abc: 2 2 (-1) :xyz}
2171 do_test printf-2.5.9.1 {
2172 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 -99.99999
2173 } {abc: (-100.00) :xyz}
2174 do_test printf-2.5.9.2 {
2175 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 -99.99999
2176 } {abc: (-1.00e+02) :xyz}
2177 do_test printf-2.5.9.3 {
2178 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 -99.99999
2179 } {abc: (-1e+02) :xyz}
2180 do_test printf-2.5.9.4 {
2181 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 -99.99999
2182 } {abc: 2 2 (-100) :xyz}
2183 do_test printf-2.5.9.5 {
2184 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 -99.99999
2185 } {abc: 2 2 (-100.000) :xyz}
2186 do_test printf-2.5.9.6 {
2187 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 -99.99999
2188 } {abc: 2 2 (-000000100) :xyz}
2189 do_test printf-2.5.9.7 {
2190 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 -99.99999
2191 } {abc: 2 2 (-100.00) :xyz}
2192 do_test printf-2.5.9.8 {
2193 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 -99.99999
2194 } {abc: 2 2 (-1.00e+02) :xyz}
2195 do_test printf-2.5.9.9 {
2196 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 -99.99999
2197 } {abc: 2 2 (-1e+02) :xyz}
2198 do_test printf-2.5.10.1 {
2199 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 3.14e+9
2200 } {abc: (3140000000.00) :xyz}
2201 do_test printf-2.5.10.2 {
2202 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 3.14e+9
2203 } {abc: (3.14e+09) :xyz}
2204 do_test printf-2.5.10.3 {
2205 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 3.14e+9
2206 } {abc: (3.1e+09) :xyz}
2207 do_test printf-2.5.10.4 {
2208 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 3.14e+9
2209 } {abc: 2 2 (3.14e+09) :xyz}
2210 do_test printf-2.5.10.5 {
2211 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 3.14e+9
2212 } {abc: 2 2 (3.14000e+09) :xyz}
2213 do_test printf-2.5.10.6 {
2214 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 3.14e+9
2215 } {abc: 2 2 (003.14e+09) :xyz}
2216 do_test printf-2.5.10.7 {
2217 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 3.14e+9
2218 } {abc: 2 2 (3140000000.00) :xyz}
2219 do_test printf-2.5.10.8 {
2220 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 3.14e+9
2221 } {abc: 2 2 (3.14e+09) :xyz}
2222 do_test printf-2.5.10.9 {
2223 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 3.14e+9
2224 } {abc: 2 2 (3.1e+09) :xyz}
2225 do_test printf-2.5.11.2 {
2226 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 -4.72732e+88
2227 } {abc: (-4.73e+88) :xyz}
2228 do_test printf-2.5.11.3 {
2229 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 -4.72732e+88
2230 } {abc: (-4.7e+88) :xyz}
2231 do_test printf-2.5.11.4 {
2232 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 -4.72732e+88
2233 } {abc: 2 2 (-4.72732e+88) :xyz}
2234 do_test printf-2.5.11.5 {
2235 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 -4.72732e+88
2236 } {abc: 2 2 (-4.72732e+88) :xyz}
2237 do_test printf-2.5.11.6 {
2238 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 -4.72732e+88
2239 } {abc: 2 2 (-4.72732e+88) :xyz}
2240 do_test printf-2.5.11.8 {
2241 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 -4.72732e+88
2242 } {abc: 2 2 (-4.73e+88) :xyz}
2243 do_test printf-2.5.11.9 {
2244 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 -4.72732e+88
2245 } {abc: 2 2 (-4.7e+88) :xyz}
2246 do_test printf-2.5.12.2 {
2247 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 9.87991e+143
2248 } {abc: (9.88e+143) :xyz}
2249 do_test printf-2.5.12.3 {
2250 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 9.87991e+143
2251 } {abc: (9.9e+143) :xyz}
2252 do_test printf-2.5.12.4 {
2253 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 9.87991e+143
2254 } {abc: 2 2 (9.87991e+143) :xyz}
2255 do_test printf-2.5.12.5 {
2256 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 9.87991e+143
2257 } {abc: 2 2 (9.87991e+143) :xyz}
2258 do_test printf-2.5.12.6 {
2259 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 9.87991e+143
2260 } {abc: 2 2 (9.87991e+143) :xyz}
2261 do_test printf-2.5.12.8 {
2262 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 9.87991e+143
2263 } {abc: 2 2 (9.88e+143) :xyz}
2264 do_test printf-2.5.12.9 {
2265 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 9.87991e+143
2266 } {abc: 2 2 (9.9e+143) :xyz}
2267 do_test printf-2.5.13.1 {
2268 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 -6.287291e-9
2269 } {abc: (-0.00) :xyz}
2270 do_test printf-2.5.13.2 {
2271 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 -6.287291e-9
2272 } {abc: (-6.29e-09) :xyz}
2273 do_test printf-2.5.13.3 {
2274 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 -6.287291e-9
2275 } {abc: (-6.3e-09) :xyz}
2276 do_test printf-2.5.13.4 {
2277 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 -6.287291e-9
2278 } {abc: 2 2 (-6.28729e-09) :xyz}
2279 do_test printf-2.5.13.5 {
2280 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 -6.287291e-9
2281 } {abc: 2 2 (-6.28729e-09) :xyz}
2282 do_test printf-2.5.13.6 {
2283 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 -6.287291e-9
2284 } {abc: 2 2 (-6.28729e-09) :xyz}
2285 do_test printf-2.5.13.7 {
2286 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 -6.287291e-9
2287 } {abc: 2 2 (-0.00) :xyz}
2288 do_test printf-2.5.13.8 {
2289 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 -6.287291e-9
2290 } {abc: 2 2 (-6.29e-09) :xyz}
2291 do_test printf-2.5.13.9 {
2292 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 -6.287291e-9
2293 } {abc: 2 2 (-6.3e-09) :xyz}
2294 do_test printf-2.5.14.1 {
2295 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 2 3.38826392e-110
2296 } {abc: (0.00) :xyz}
2297 do_test printf-2.5.14.2 {
2298 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 2 3.38826392e-110
2299 } {abc: (3.39e-110) :xyz}
2300 do_test printf-2.5.14.3 {
2301 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 2 3.38826392e-110
2302 } {abc: (3.4e-110) :xyz}
2303 do_test printf-2.5.14.4 {
2304 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 2 3.38826392e-110
2305 } {abc: 2 2 (3.38826e-110) :xyz}
2306 do_test printf-2.5.14.5 {
2307 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 2 3.38826392e-110
2308 } {abc: 2 2 (3.38826e-110) :xyz}
2309 do_test printf-2.5.14.6 {
2310 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 2 3.38826392e-110
2311 } {abc: 2 2 (3.38826e-110) :xyz}
2312 do_test printf-2.5.14.7 {
2313 sqlite3_mprintf_double {abc: %d %d (%2.2f) :xyz} 2 2 3.38826392e-110
2314 } {abc: 2 2 (0.00) :xyz}
2315 do_test printf-2.5.14.8 {
2316 sqlite3_mprintf_double {abc: %d %d (%2.2e) :xyz} 2 2 3.38826392e-110
2317 } {abc: 2 2 (3.39e-110) :xyz}
2318 do_test printf-2.5.14.9 {
2319 sqlite3_mprintf_double {abc: %d %d (%2.2g) :xyz} 2 2 3.38826392e-110
2320 } {abc: 2 2 (3.4e-110) :xyz}
2321 do_test printf-2.6.1.1 {
2322 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 0.001
2323 } {abc: (0.001) :xyz}
2324 do_test printf-2.6.1.2 {
2325 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 0.001
2326 } {abc: (1.000e-03) :xyz}
2327 do_test printf-2.6.1.3 {
2328 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 0.001
2329 } {abc: (0.001) :xyz}
2330 do_test printf-2.6.1.4 {
2331 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 0.001
2332 } {abc: 2 3 (0.001) :xyz}
2333 do_test printf-2.6.1.5 {
2334 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 0.001
2335 } {abc: 2 3 (0.00100000) :xyz}
2336 do_test printf-2.6.1.6 {
2337 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 0.001
2338 } {abc: 2 3 (000000.001) :xyz}
2339 do_test printf-2.6.1.7 {
2340 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 0.001
2341 } {abc: 2 3 (0.001) :xyz}
2342 do_test printf-2.6.1.8 {
2343 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 0.001
2344 } {abc: 2 3 (1.000e-03) :xyz}
2345 do_test printf-2.6.1.9 {
2346 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 0.001
2347 } {abc: 2 3 (0.001) :xyz}
2348 do_test printf-2.6.2.1 {
2349 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 1.0e-20
2350 } {abc: (0.000) :xyz}
2351 do_test printf-2.6.2.2 {
2352 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 1.0e-20
2353 } {abc: (1.000e-20) :xyz}
2354 do_test printf-2.6.2.3 {
2355 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 1.0e-20
2356 } {abc: (1e-20) :xyz}
2357 do_test printf-2.6.2.4 {
2358 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 1.0e-20
2359 } {abc: 2 3 (1e-20) :xyz}
2360 do_test printf-2.6.2.5 {
2361 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 1.0e-20
2362 } {abc: 2 3 (1.00000e-20) :xyz}
2363 do_test printf-2.6.2.6 {
2364 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 1.0e-20
2365 } {abc: 2 3 (000001e-20) :xyz}
2366 do_test printf-2.6.2.7 {
2367 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 1.0e-20
2368 } {abc: 2 3 (0.000) :xyz}
2369 do_test printf-2.6.2.8 {
2370 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 1.0e-20
2371 } {abc: 2 3 (1.000e-20) :xyz}
2372 do_test printf-2.6.2.9 {
2373 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 1.0e-20
2374 } {abc: 2 3 (1e-20) :xyz}
2375 do_test printf-2.6.3.1 {
2376 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 1.0
2377 } {abc: (1.000) :xyz}
2378 do_test printf-2.6.3.2 {
2379 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 1.0
2380 } {abc: (1.000e+00) :xyz}
2381 do_test printf-2.6.3.3 {
2382 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 1.0
2384 do_test printf-2.6.3.4 {
2385 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 1.0
2386 } {abc: 2 3 (1) :xyz}
2387 do_test printf-2.6.3.5 {
2388 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 1.0
2389 } {abc: 2 3 (1.00000) :xyz}
2390 do_test printf-2.6.3.6 {
2391 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 1.0
2392 } {abc: 2 3 (0000000001) :xyz}
2393 do_test printf-2.6.3.7 {
2394 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 1.0
2395 } {abc: 2 3 (1.000) :xyz}
2396 do_test printf-2.6.3.8 {
2397 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 1.0
2398 } {abc: 2 3 (1.000e+00) :xyz}
2399 do_test printf-2.6.3.9 {
2400 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 1.0
2401 } {abc: 2 3 ( 1) :xyz}
2402 do_test printf-2.6.4.1 {
2403 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 0.0
2404 } {abc: (0.000) :xyz}
2405 do_test printf-2.6.4.2 {
2406 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 0.0
2407 } {abc: (0.000e+00) :xyz}
2408 do_test printf-2.6.4.3 {
2409 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 0.0
2411 do_test printf-2.6.4.4 {
2412 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 0.0
2413 } {abc: 2 3 (0) :xyz}
2414 do_test printf-2.6.4.5 {
2415 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 0.0
2416 } {abc: 2 3 (0.00000) :xyz}
2417 do_test printf-2.6.4.6 {
2418 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 0.0
2419 } {abc: 2 3 (0000000000) :xyz}
2420 do_test printf-2.6.4.7 {
2421 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 0.0
2422 } {abc: 2 3 (0.000) :xyz}
2423 do_test printf-2.6.4.8 {
2424 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 0.0
2425 } {abc: 2 3 (0.000e+00) :xyz}
2426 do_test printf-2.6.4.9 {
2427 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 0.0
2428 } {abc: 2 3 ( 0) :xyz}
2429 do_test printf-2.6.5.1 {
2430 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 100.0
2431 } {abc: (100.000) :xyz}
2432 do_test printf-2.6.5.2 {
2433 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 100.0
2434 } {abc: (1.000e+02) :xyz}
2435 do_test printf-2.6.5.3 {
2436 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 100.0
2438 do_test printf-2.6.5.4 {
2439 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 100.0
2440 } {abc: 2 3 (100) :xyz}
2441 do_test printf-2.6.5.5 {
2442 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 100.0
2443 } {abc: 2 3 (100.000) :xyz}
2444 do_test printf-2.6.5.6 {
2445 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 100.0
2446 } {abc: 2 3 (0000000100) :xyz}
2447 do_test printf-2.6.5.7 {
2448 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 100.0
2449 } {abc: 2 3 (100.000) :xyz}
2450 do_test printf-2.6.5.8 {
2451 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 100.0
2452 } {abc: 2 3 (1.000e+02) :xyz}
2453 do_test printf-2.6.5.9 {
2454 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 100.0
2455 } {abc: 2 3 (100) :xyz}
2456 do_test printf-2.6.6.1 {
2457 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 9.99999
2458 } {abc: (10.000) :xyz}
2459 do_test printf-2.6.6.2 {
2460 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 9.99999
2461 } {abc: (1.000e+01) :xyz}
2462 do_test printf-2.6.6.3 {
2463 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 9.99999
2465 do_test printf-2.6.6.4 {
2466 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 9.99999
2467 } {abc: 2 3 (9.99999) :xyz}
2468 do_test printf-2.6.6.5 {
2469 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 9.99999
2470 } {abc: 2 3 (9.99999) :xyz}
2471 do_test printf-2.6.6.6 {
2472 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 9.99999
2473 } {abc: 2 3 (0009.99999) :xyz}
2474 do_test printf-2.6.6.7 {
2475 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 9.99999
2476 } {abc: 2 3 (10.000) :xyz}
2477 do_test printf-2.6.6.8 {
2478 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 9.99999
2479 } {abc: 2 3 (1.000e+01) :xyz}
2480 do_test printf-2.6.6.9 {
2481 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 9.99999
2482 } {abc: 2 3 (10) :xyz}
2483 do_test printf-2.6.7.1 {
2484 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 -0.00543
2485 } {abc: (-0.005) :xyz}
2486 do_test printf-2.6.7.2 {
2487 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 -0.00543
2488 } {abc: (-5.430e-03) :xyz}
2489 do_test printf-2.6.7.3 {
2490 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 -0.00543
2491 } {abc: (-0.00543) :xyz}
2492 do_test printf-2.6.7.4 {
2493 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 -0.00543
2494 } {abc: 2 3 (-0.00543) :xyz}
2495 do_test printf-2.6.7.5 {
2496 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 -0.00543
2497 } {abc: 2 3 (-0.00543000) :xyz}
2498 do_test printf-2.6.7.6 {
2499 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 -0.00543
2500 } {abc: 2 3 (-000.00543) :xyz}
2501 do_test printf-2.6.7.7 {
2502 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 -0.00543
2503 } {abc: 2 3 (-0.005) :xyz}
2504 do_test printf-2.6.7.8 {
2505 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 -0.00543
2506 } {abc: 2 3 (-5.430e-03) :xyz}
2507 do_test printf-2.6.7.9 {
2508 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 -0.00543
2509 } {abc: 2 3 (-0.00543) :xyz}
2510 do_test printf-2.6.8.1 {
2511 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 -1.0
2512 } {abc: (-1.000) :xyz}
2513 do_test printf-2.6.8.2 {
2514 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 -1.0
2515 } {abc: (-1.000e+00) :xyz}
2516 do_test printf-2.6.8.3 {
2517 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 -1.0
2519 do_test printf-2.6.8.4 {
2520 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 -1.0
2521 } {abc: 2 3 (-1) :xyz}
2522 do_test printf-2.6.8.5 {
2523 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 -1.0
2524 } {abc: 2 3 (-1.00000) :xyz}
2525 do_test printf-2.6.8.6 {
2526 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 -1.0
2527 } {abc: 2 3 (-000000001) :xyz}
2528 do_test printf-2.6.8.7 {
2529 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 -1.0
2530 } {abc: 2 3 (-1.000) :xyz}
2531 do_test printf-2.6.8.8 {
2532 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 -1.0
2533 } {abc: 2 3 (-1.000e+00) :xyz}
2534 do_test printf-2.6.8.9 {
2535 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 -1.0
2536 } {abc: 2 3 (-1) :xyz}
2537 do_test printf-2.6.9.1 {
2538 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 -99.99999
2539 } {abc: (-100.000) :xyz}
2540 do_test printf-2.6.9.2 {
2541 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 -99.99999
2542 } {abc: (-1.000e+02) :xyz}
2543 do_test printf-2.6.9.3 {
2544 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 -99.99999
2545 } {abc: (-100) :xyz}
2546 do_test printf-2.6.9.4 {
2547 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 -99.99999
2548 } {abc: 2 3 (-100) :xyz}
2549 do_test printf-2.6.9.5 {
2550 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 -99.99999
2551 } {abc: 2 3 (-100.000) :xyz}
2552 do_test printf-2.6.9.6 {
2553 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 -99.99999
2554 } {abc: 2 3 (-000000100) :xyz}
2555 do_test printf-2.6.9.7 {
2556 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 -99.99999
2557 } {abc: 2 3 (-100.000) :xyz}
2558 do_test printf-2.6.9.8 {
2559 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 -99.99999
2560 } {abc: 2 3 (-1.000e+02) :xyz}
2561 do_test printf-2.6.9.9 {
2562 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 -99.99999
2563 } {abc: 2 3 (-100) :xyz}
2564 do_test printf-2.6.10.1 {
2565 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 3.14e+9
2566 } {abc: (3140000000.000) :xyz}
2567 do_test printf-2.6.10.2 {
2568 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 3.14e+9
2569 } {abc: (3.140e+09) :xyz}
2570 do_test printf-2.6.10.3 {
2571 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 3.14e+9
2572 } {abc: (3.14e+09) :xyz}
2573 do_test printf-2.6.10.4 {
2574 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 3.14e+9
2575 } {abc: 2 3 (3.14e+09) :xyz}
2576 do_test printf-2.6.10.5 {
2577 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 3.14e+9
2578 } {abc: 2 3 (3.14000e+09) :xyz}
2579 do_test printf-2.6.10.6 {
2580 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 3.14e+9
2581 } {abc: 2 3 (003.14e+09) :xyz}
2582 do_test printf-2.6.10.7 {
2583 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 3.14e+9
2584 } {abc: 2 3 (3140000000.000) :xyz}
2585 do_test printf-2.6.10.8 {
2586 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 3.14e+9
2587 } {abc: 2 3 (3.140e+09) :xyz}
2588 do_test printf-2.6.10.9 {
2589 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 3.14e+9
2590 } {abc: 2 3 (3.14e+09) :xyz}
2591 do_test printf-2.6.11.2 {
2592 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 -4.72732e+88
2593 } {abc: (-4.727e+88) :xyz}
2594 do_test printf-2.6.11.3 {
2595 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 -4.72732e+88
2596 } {abc: (-4.73e+88) :xyz}
2597 do_test printf-2.6.11.4 {
2598 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 -4.72732e+88
2599 } {abc: 2 3 (-4.72732e+88) :xyz}
2600 do_test printf-2.6.11.5 {
2601 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 -4.72732e+88
2602 } {abc: 2 3 (-4.72732e+88) :xyz}
2603 do_test printf-2.6.11.6 {
2604 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 -4.72732e+88
2605 } {abc: 2 3 (-4.72732e+88) :xyz}
2606 do_test printf-2.6.11.8 {
2607 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 -4.72732e+88
2608 } {abc: 2 3 (-4.727e+88) :xyz}
2609 do_test printf-2.6.11.9 {
2610 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 -4.72732e+88
2611 } {abc: 2 3 (-4.73e+88) :xyz}
2612 do_test printf-2.6.12.2 {
2613 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 9.87991e+143
2614 } {abc: (9.880e+143) :xyz}
2615 do_test printf-2.6.12.3 {
2616 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 9.87991e+143
2617 } {abc: (9.88e+143) :xyz}
2618 do_test printf-2.6.12.4 {
2619 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 9.87991e+143
2620 } {abc: 2 3 (9.87991e+143) :xyz}
2621 do_test printf-2.6.12.5 {
2622 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 9.87991e+143
2623 } {abc: 2 3 (9.87991e+143) :xyz}
2624 do_test printf-2.6.12.6 {
2625 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 9.87991e+143
2626 } {abc: 2 3 (9.87991e+143) :xyz}
2627 do_test printf-2.6.12.8 {
2628 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 9.87991e+143
2629 } {abc: 2 3 (9.880e+143) :xyz}
2630 do_test printf-2.6.12.9 {
2631 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 9.87991e+143
2632 } {abc: 2 3 (9.88e+143) :xyz}
2633 do_test printf-2.6.13.1 {
2634 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 -6.287291e-9
2635 } {abc: (-0.000) :xyz}
2636 do_test printf-2.6.13.2 {
2637 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 -6.287291e-9
2638 } {abc: (-6.287e-09) :xyz}
2639 do_test printf-2.6.13.3 {
2640 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 -6.287291e-9
2641 } {abc: (-6.29e-09) :xyz}
2642 do_test printf-2.6.13.4 {
2643 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 -6.287291e-9
2644 } {abc: 2 3 (-6.28729e-09) :xyz}
2645 do_test printf-2.6.13.5 {
2646 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 -6.287291e-9
2647 } {abc: 2 3 (-6.28729e-09) :xyz}
2648 do_test printf-2.6.13.6 {
2649 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 -6.287291e-9
2650 } {abc: 2 3 (-6.28729e-09) :xyz}
2651 do_test printf-2.6.13.7 {
2652 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 -6.287291e-9
2653 } {abc: 2 3 (-0.000) :xyz}
2654 do_test printf-2.6.13.8 {
2655 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 -6.287291e-9
2656 } {abc: 2 3 (-6.287e-09) :xyz}
2657 do_test printf-2.6.13.9 {
2658 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 -6.287291e-9
2659 } {abc: 2 3 (-6.29e-09) :xyz}
2660 do_test printf-2.6.14.1 {
2661 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 2 3 3.38826392e-110
2662 } {abc: (0.000) :xyz}
2663 do_test printf-2.6.14.2 {
2664 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 2 3 3.38826392e-110
2665 } {abc: (3.388e-110) :xyz}
2666 do_test printf-2.6.14.3 {
2667 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 2 3 3.38826392e-110
2668 } {abc: (3.39e-110) :xyz}
2669 do_test printf-2.6.14.4 {
2670 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 2 3 3.38826392e-110
2671 } {abc: 2 3 (3.38826e-110) :xyz}
2672 do_test printf-2.6.14.5 {
2673 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 2 3 3.38826392e-110
2674 } {abc: 2 3 (3.38826e-110) :xyz}
2675 do_test printf-2.6.14.6 {
2676 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 2 3 3.38826392e-110
2677 } {abc: 2 3 (3.38826e-110) :xyz}
2678 do_test printf-2.6.14.7 {
2679 sqlite3_mprintf_double {abc: %d %d (%2.3f) :xyz} 2 3 3.38826392e-110
2680 } {abc: 2 3 (0.000) :xyz}
2681 do_test printf-2.6.14.8 {
2682 sqlite3_mprintf_double {abc: %d %d (%2.3e) :xyz} 2 3 3.38826392e-110
2683 } {abc: 2 3 (3.388e-110) :xyz}
2684 do_test printf-2.6.14.9 {
2685 sqlite3_mprintf_double {abc: %d %d (%2.3g) :xyz} 2 3 3.38826392e-110
2686 } {abc: 2 3 (3.39e-110) :xyz}
2687 do_test printf-2.7.1.1 {
2688 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 0.001
2689 } {abc: (0.001) :xyz}
2690 do_test printf-2.7.1.2 {
2691 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 0.001
2692 } {abc: (1.000e-03) :xyz}
2693 do_test printf-2.7.1.3 {
2694 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 0.001
2695 } {abc: (0.001) :xyz}
2696 do_test printf-2.7.1.4 {
2697 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 0.001
2698 } {abc: 3 3 (0.001) :xyz}
2699 do_test printf-2.7.1.5 {
2700 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 0.001
2701 } {abc: 3 3 (0.00100000) :xyz}
2702 do_test printf-2.7.1.6 {
2703 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 0.001
2704 } {abc: 3 3 (000000.001) :xyz}
2705 do_test printf-2.7.1.7 {
2706 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 0.001
2707 } {abc: 3 3 (0.001) :xyz}
2708 do_test printf-2.7.1.8 {
2709 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 0.001
2710 } {abc: 3 3 (1.000e-03) :xyz}
2711 do_test printf-2.7.1.9 {
2712 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 0.001
2713 } {abc: 3 3 (0.001) :xyz}
2714 do_test printf-2.7.2.1 {
2715 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 1.0e-20
2716 } {abc: (0.000) :xyz}
2717 do_test printf-2.7.2.2 {
2718 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 1.0e-20
2719 } {abc: (1.000e-20) :xyz}
2720 do_test printf-2.7.2.3 {
2721 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 1.0e-20
2722 } {abc: (1e-20) :xyz}
2723 do_test printf-2.7.2.4 {
2724 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 1.0e-20
2725 } {abc: 3 3 (1e-20) :xyz}
2726 do_test printf-2.7.2.5 {
2727 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 1.0e-20
2728 } {abc: 3 3 (1.00000e-20) :xyz}
2729 do_test printf-2.7.2.6 {
2730 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 1.0e-20
2731 } {abc: 3 3 (000001e-20) :xyz}
2732 do_test printf-2.7.2.7 {
2733 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 1.0e-20
2734 } {abc: 3 3 (0.000) :xyz}
2735 do_test printf-2.7.2.8 {
2736 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 1.0e-20
2737 } {abc: 3 3 (1.000e-20) :xyz}
2738 do_test printf-2.7.2.9 {
2739 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 1.0e-20
2740 } {abc: 3 3 (1e-20) :xyz}
2741 do_test printf-2.7.3.1 {
2742 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 1.0
2743 } {abc: (1.000) :xyz}
2744 do_test printf-2.7.3.2 {
2745 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 1.0
2746 } {abc: (1.000e+00) :xyz}
2747 do_test printf-2.7.3.3 {
2748 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 1.0
2750 do_test printf-2.7.3.4 {
2751 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 1.0
2752 } {abc: 3 3 (1) :xyz}
2753 do_test printf-2.7.3.5 {
2754 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 1.0
2755 } {abc: 3 3 (1.00000) :xyz}
2756 do_test printf-2.7.3.6 {
2757 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 1.0
2758 } {abc: 3 3 (0000000001) :xyz}
2759 do_test printf-2.7.3.7 {
2760 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 1.0
2761 } {abc: 3 3 (1.000) :xyz}
2762 do_test printf-2.7.3.8 {
2763 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 1.0
2764 } {abc: 3 3 (1.000e+00) :xyz}
2765 do_test printf-2.7.3.9 {
2766 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 1.0
2767 } {abc: 3 3 ( 1) :xyz}
2768 do_test printf-2.7.4.1 {
2769 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 0.0
2770 } {abc: (0.000) :xyz}
2771 do_test printf-2.7.4.2 {
2772 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 0.0
2773 } {abc: (0.000e+00) :xyz}
2774 do_test printf-2.7.4.3 {
2775 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 0.0
2777 do_test printf-2.7.4.4 {
2778 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 0.0
2779 } {abc: 3 3 (0) :xyz}
2780 do_test printf-2.7.4.5 {
2781 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 0.0
2782 } {abc: 3 3 (0.00000) :xyz}
2783 do_test printf-2.7.4.6 {
2784 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 0.0
2785 } {abc: 3 3 (0000000000) :xyz}
2786 do_test printf-2.7.4.7 {
2787 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 0.0
2788 } {abc: 3 3 (0.000) :xyz}
2789 do_test printf-2.7.4.8 {
2790 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 0.0
2791 } {abc: 3 3 (0.000e+00) :xyz}
2792 do_test printf-2.7.4.9 {
2793 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 0.0
2794 } {abc: 3 3 ( 0) :xyz}
2795 do_test printf-2.7.5.1 {
2796 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 100.0
2797 } {abc: (100.000) :xyz}
2798 do_test printf-2.7.5.2 {
2799 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 100.0
2800 } {abc: (1.000e+02) :xyz}
2801 do_test printf-2.7.5.3 {
2802 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 100.0
2804 do_test printf-2.7.5.4 {
2805 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 100.0
2806 } {abc: 3 3 (100) :xyz}
2807 do_test printf-2.7.5.5 {
2808 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 100.0
2809 } {abc: 3 3 (100.000) :xyz}
2810 do_test printf-2.7.5.6 {
2811 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 100.0
2812 } {abc: 3 3 (0000000100) :xyz}
2813 do_test printf-2.7.5.7 {
2814 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 100.0
2815 } {abc: 3 3 (100.000) :xyz}
2816 do_test printf-2.7.5.8 {
2817 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 100.0
2818 } {abc: 3 3 (1.000e+02) :xyz}
2819 do_test printf-2.7.5.9 {
2820 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 100.0
2821 } {abc: 3 3 (100) :xyz}
2822 do_test printf-2.7.6.1 {
2823 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 9.99999
2824 } {abc: (10.000) :xyz}
2825 do_test printf-2.7.6.2 {
2826 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 9.99999
2827 } {abc: (1.000e+01) :xyz}
2828 do_test printf-2.7.6.3 {
2829 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 9.99999
2831 do_test printf-2.7.6.4 {
2832 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 9.99999
2833 } {abc: 3 3 (9.99999) :xyz}
2834 do_test printf-2.7.6.5 {
2835 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 9.99999
2836 } {abc: 3 3 (9.99999) :xyz}
2837 do_test printf-2.7.6.6 {
2838 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 9.99999
2839 } {abc: 3 3 (0009.99999) :xyz}
2840 do_test printf-2.7.6.7 {
2841 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 9.99999
2842 } {abc: 3 3 (10.000) :xyz}
2843 do_test printf-2.7.6.8 {
2844 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 9.99999
2845 } {abc: 3 3 (1.000e+01) :xyz}
2846 do_test printf-2.7.6.9 {
2847 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 9.99999
2848 } {abc: 3 3 ( 10) :xyz}
2849 do_test printf-2.7.7.1 {
2850 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 -0.00543
2851 } {abc: (-0.005) :xyz}
2852 do_test printf-2.7.7.2 {
2853 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 -0.00543
2854 } {abc: (-5.430e-03) :xyz}
2855 do_test printf-2.7.7.3 {
2856 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 -0.00543
2857 } {abc: (-0.00543) :xyz}
2858 do_test printf-2.7.7.4 {
2859 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 -0.00543
2860 } {abc: 3 3 (-0.00543) :xyz}
2861 do_test printf-2.7.7.5 {
2862 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 -0.00543
2863 } {abc: 3 3 (-0.00543000) :xyz}
2864 do_test printf-2.7.7.6 {
2865 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 -0.00543
2866 } {abc: 3 3 (-000.00543) :xyz}
2867 do_test printf-2.7.7.7 {
2868 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 -0.00543
2869 } {abc: 3 3 (-0.005) :xyz}
2870 do_test printf-2.7.7.8 {
2871 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 -0.00543
2872 } {abc: 3 3 (-5.430e-03) :xyz}
2873 do_test printf-2.7.7.9 {
2874 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 -0.00543
2875 } {abc: 3 3 (-0.00543) :xyz}
2876 do_test printf-2.7.8.1 {
2877 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 -1.0
2878 } {abc: (-1.000) :xyz}
2879 do_test printf-2.7.8.2 {
2880 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 -1.0
2881 } {abc: (-1.000e+00) :xyz}
2882 do_test printf-2.7.8.3 {
2883 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 -1.0
2885 do_test printf-2.7.8.4 {
2886 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 -1.0
2887 } {abc: 3 3 (-1) :xyz}
2888 do_test printf-2.7.8.5 {
2889 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 -1.0
2890 } {abc: 3 3 (-1.00000) :xyz}
2891 do_test printf-2.7.8.6 {
2892 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 -1.0
2893 } {abc: 3 3 (-000000001) :xyz}
2894 do_test printf-2.7.8.7 {
2895 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 -1.0
2896 } {abc: 3 3 (-1.000) :xyz}
2897 do_test printf-2.7.8.8 {
2898 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 -1.0
2899 } {abc: 3 3 (-1.000e+00) :xyz}
2900 do_test printf-2.7.8.9 {
2901 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 -1.0
2902 } {abc: 3 3 ( -1) :xyz}
2903 do_test printf-2.7.9.1 {
2904 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 -99.99999
2905 } {abc: (-100.000) :xyz}
2906 do_test printf-2.7.9.2 {
2907 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 -99.99999
2908 } {abc: (-1.000e+02) :xyz}
2909 do_test printf-2.7.9.3 {
2910 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 -99.99999
2911 } {abc: (-100) :xyz}
2912 do_test printf-2.7.9.4 {
2913 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 -99.99999
2914 } {abc: 3 3 (-100) :xyz}
2915 do_test printf-2.7.9.5 {
2916 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 -99.99999
2917 } {abc: 3 3 (-100.000) :xyz}
2918 do_test printf-2.7.9.6 {
2919 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 -99.99999
2920 } {abc: 3 3 (-000000100) :xyz}
2921 do_test printf-2.7.9.7 {
2922 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 -99.99999
2923 } {abc: 3 3 (-100.000) :xyz}
2924 do_test printf-2.7.9.8 {
2925 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 -99.99999
2926 } {abc: 3 3 (-1.000e+02) :xyz}
2927 do_test printf-2.7.9.9 {
2928 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 -99.99999
2929 } {abc: 3 3 (-100) :xyz}
2930 do_test printf-2.7.10.1 {
2931 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 3.14e+9
2932 } {abc: (3140000000.000) :xyz}
2933 do_test printf-2.7.10.2 {
2934 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 3.14e+9
2935 } {abc: (3.140e+09) :xyz}
2936 do_test printf-2.7.10.3 {
2937 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 3.14e+9
2938 } {abc: (3.14e+09) :xyz}
2939 do_test printf-2.7.10.4 {
2940 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 3.14e+9
2941 } {abc: 3 3 (3.14e+09) :xyz}
2942 do_test printf-2.7.10.5 {
2943 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 3.14e+9
2944 } {abc: 3 3 (3.14000e+09) :xyz}
2945 do_test printf-2.7.10.6 {
2946 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 3.14e+9
2947 } {abc: 3 3 (003.14e+09) :xyz}
2948 do_test printf-2.7.10.7 {
2949 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 3.14e+9
2950 } {abc: 3 3 (3140000000.000) :xyz}
2951 do_test printf-2.7.10.8 {
2952 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 3.14e+9
2953 } {abc: 3 3 (3.140e+09) :xyz}
2954 do_test printf-2.7.10.9 {
2955 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 3.14e+9
2956 } {abc: 3 3 (3.14e+09) :xyz}
2957 do_test printf-2.7.11.2 {
2958 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 -4.72732e+88
2959 } {abc: (-4.727e+88) :xyz}
2960 do_test printf-2.7.11.3 {
2961 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 -4.72732e+88
2962 } {abc: (-4.73e+88) :xyz}
2963 do_test printf-2.7.11.4 {
2964 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 -4.72732e+88
2965 } {abc: 3 3 (-4.72732e+88) :xyz}
2966 do_test printf-2.7.11.5 {
2967 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 -4.72732e+88
2968 } {abc: 3 3 (-4.72732e+88) :xyz}
2969 do_test printf-2.7.11.6 {
2970 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 -4.72732e+88
2971 } {abc: 3 3 (-4.72732e+88) :xyz}
2972 do_test printf-2.7.11.8 {
2973 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 -4.72732e+88
2974 } {abc: 3 3 (-4.727e+88) :xyz}
2975 do_test printf-2.7.11.9 {
2976 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 -4.72732e+88
2977 } {abc: 3 3 (-4.73e+88) :xyz}
2978 do_test printf-2.7.12.2 {
2979 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 9.87991e+143
2980 } {abc: (9.880e+143) :xyz}
2981 do_test printf-2.7.12.3 {
2982 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 9.87991e+143
2983 } {abc: (9.88e+143) :xyz}
2984 do_test printf-2.7.12.4 {
2985 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 9.87991e+143
2986 } {abc: 3 3 (9.87991e+143) :xyz}
2987 do_test printf-2.7.12.5 {
2988 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 9.87991e+143
2989 } {abc: 3 3 (9.87991e+143) :xyz}
2990 do_test printf-2.7.12.6 {
2991 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 9.87991e+143
2992 } {abc: 3 3 (9.87991e+143) :xyz}
2993 do_test printf-2.7.12.8 {
2994 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 9.87991e+143
2995 } {abc: 3 3 (9.880e+143) :xyz}
2996 do_test printf-2.7.12.9 {
2997 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 9.87991e+143
2998 } {abc: 3 3 (9.88e+143) :xyz}
2999 do_test printf-2.7.13.1 {
3000 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 -6.287291e-9
3001 } {abc: (-0.000) :xyz}
3002 do_test printf-2.7.13.2 {
3003 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 -6.287291e-9
3004 } {abc: (-6.287e-09) :xyz}
3005 do_test printf-2.7.13.3 {
3006 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 -6.287291e-9
3007 } {abc: (-6.29e-09) :xyz}
3008 do_test printf-2.7.13.4 {
3009 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 -6.287291e-9
3010 } {abc: 3 3 (-6.28729e-09) :xyz}
3011 do_test printf-2.7.13.5 {
3012 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 -6.287291e-9
3013 } {abc: 3 3 (-6.28729e-09) :xyz}
3014 do_test printf-2.7.13.6 {
3015 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 -6.287291e-9
3016 } {abc: 3 3 (-6.28729e-09) :xyz}
3017 do_test printf-2.7.13.7 {
3018 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 -6.287291e-9
3019 } {abc: 3 3 (-0.000) :xyz}
3020 do_test printf-2.7.13.8 {
3021 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 -6.287291e-9
3022 } {abc: 3 3 (-6.287e-09) :xyz}
3023 do_test printf-2.7.13.9 {
3024 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 -6.287291e-9
3025 } {abc: 3 3 (-6.29e-09) :xyz}
3026 do_test printf-2.7.14.1 {
3027 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 3 3.38826392e-110
3028 } {abc: (0.000) :xyz}
3029 do_test printf-2.7.14.2 {
3030 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 3 3.38826392e-110
3031 } {abc: (3.388e-110) :xyz}
3032 do_test printf-2.7.14.3 {
3033 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 3 3.38826392e-110
3034 } {abc: (3.39e-110) :xyz}
3035 do_test printf-2.7.14.4 {
3036 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 3 3.38826392e-110
3037 } {abc: 3 3 (3.38826e-110) :xyz}
3038 do_test printf-2.7.14.5 {
3039 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 3 3.38826392e-110
3040 } {abc: 3 3 (3.38826e-110) :xyz}
3041 do_test printf-2.7.14.6 {
3042 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 3 3.38826392e-110
3043 } {abc: 3 3 (3.38826e-110) :xyz}
3044 do_test printf-2.7.14.7 {
3045 sqlite3_mprintf_double {abc: %d %d (%3.3f) :xyz} 3 3 3.38826392e-110
3046 } {abc: 3 3 (0.000) :xyz}
3047 do_test printf-2.7.14.8 {
3048 sqlite3_mprintf_double {abc: %d %d (%3.3e) :xyz} 3 3 3.38826392e-110
3049 } {abc: 3 3 (3.388e-110) :xyz}
3050 do_test printf-2.7.14.9 {
3051 sqlite3_mprintf_double {abc: %d %d (%3.3g) :xyz} 3 3 3.38826392e-110
3052 } {abc: 3 3 (3.39e-110) :xyz}
3053 do_test printf-2.8.1.1 {
3054 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 0.001
3055 } {abc: (0.00) :xyz}
3056 do_test printf-2.8.1.2 {
3057 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 0.001
3058 } {abc: (1.00e-03) :xyz}
3059 do_test printf-2.8.1.3 {
3060 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 0.001
3061 } {abc: (0.001) :xyz}
3062 do_test printf-2.8.1.4 {
3063 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 0.001
3064 } {abc: 3 2 (0.001) :xyz}
3065 do_test printf-2.8.1.5 {
3066 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 0.001
3067 } {abc: 3 2 (0.00100000) :xyz}
3068 do_test printf-2.8.1.6 {
3069 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 0.001
3070 } {abc: 3 2 (000000.001) :xyz}
3071 do_test printf-2.8.1.7 {
3072 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 0.001
3073 } {abc: 3 2 (0.00) :xyz}
3074 do_test printf-2.8.1.8 {
3075 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 0.001
3076 } {abc: 3 2 (1.00e-03) :xyz}
3077 do_test printf-2.8.1.9 {
3078 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 0.001
3079 } {abc: 3 2 (0.001) :xyz}
3080 do_test printf-2.8.2.1 {
3081 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 1.0e-20
3082 } {abc: (0.00) :xyz}
3083 do_test printf-2.8.2.2 {
3084 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 1.0e-20
3085 } {abc: (1.00e-20) :xyz}
3086 do_test printf-2.8.2.3 {
3087 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 1.0e-20
3088 } {abc: (1e-20) :xyz}
3089 do_test printf-2.8.2.4 {
3090 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 1.0e-20
3091 } {abc: 3 2 (1e-20) :xyz}
3092 do_test printf-2.8.2.5 {
3093 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 1.0e-20
3094 } {abc: 3 2 (1.00000e-20) :xyz}
3095 do_test printf-2.8.2.6 {
3096 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 1.0e-20
3097 } {abc: 3 2 (000001e-20) :xyz}
3098 do_test printf-2.8.2.7 {
3099 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 1.0e-20
3100 } {abc: 3 2 (0.00) :xyz}
3101 do_test printf-2.8.2.8 {
3102 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 1.0e-20
3103 } {abc: 3 2 (1.00e-20) :xyz}
3104 do_test printf-2.8.2.9 {
3105 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 1.0e-20
3106 } {abc: 3 2 (1e-20) :xyz}
3107 do_test printf-2.8.3.1 {
3108 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 1.0
3109 } {abc: (1.00) :xyz}
3110 do_test printf-2.8.3.2 {
3111 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 1.0
3112 } {abc: (1.00e+00) :xyz}
3113 do_test printf-2.8.3.3 {
3114 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 1.0
3116 do_test printf-2.8.3.4 {
3117 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 1.0
3118 } {abc: 3 2 (1) :xyz}
3119 do_test printf-2.8.3.5 {
3120 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 1.0
3121 } {abc: 3 2 (1.00000) :xyz}
3122 do_test printf-2.8.3.6 {
3123 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 1.0
3124 } {abc: 3 2 (0000000001) :xyz}
3125 do_test printf-2.8.3.7 {
3126 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 1.0
3127 } {abc: 3 2 (1.00) :xyz}
3128 do_test printf-2.8.3.8 {
3129 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 1.0
3130 } {abc: 3 2 (1.00e+00) :xyz}
3131 do_test printf-2.8.3.9 {
3132 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 1.0
3133 } {abc: 3 2 ( 1) :xyz}
3134 do_test printf-2.8.4.1 {
3135 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 0.0
3136 } {abc: (0.00) :xyz}
3137 do_test printf-2.8.4.2 {
3138 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 0.0
3139 } {abc: (0.00e+00) :xyz}
3140 do_test printf-2.8.4.3 {
3141 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 0.0
3143 do_test printf-2.8.4.4 {
3144 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 0.0
3145 } {abc: 3 2 (0) :xyz}
3146 do_test printf-2.8.4.5 {
3147 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 0.0
3148 } {abc: 3 2 (0.00000) :xyz}
3149 do_test printf-2.8.4.6 {
3150 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 0.0
3151 } {abc: 3 2 (0000000000) :xyz}
3152 do_test printf-2.8.4.7 {
3153 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 0.0
3154 } {abc: 3 2 (0.00) :xyz}
3155 do_test printf-2.8.4.8 {
3156 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 0.0
3157 } {abc: 3 2 (0.00e+00) :xyz}
3158 do_test printf-2.8.4.9 {
3159 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 0.0
3160 } {abc: 3 2 ( 0) :xyz}
3161 do_test printf-2.8.5.1 {
3162 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 100.0
3163 } {abc: (100.00) :xyz}
3164 do_test printf-2.8.5.2 {
3165 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 100.0
3166 } {abc: (1.00e+02) :xyz}
3167 do_test printf-2.8.5.3 {
3168 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 100.0
3169 } {abc: (1e+02) :xyz}
3170 do_test printf-2.8.5.4 {
3171 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 100.0
3172 } {abc: 3 2 (100) :xyz}
3173 do_test printf-2.8.5.5 {
3174 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 100.0
3175 } {abc: 3 2 (100.000) :xyz}
3176 do_test printf-2.8.5.6 {
3177 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 100.0
3178 } {abc: 3 2 (0000000100) :xyz}
3179 do_test printf-2.8.5.7 {
3180 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 100.0
3181 } {abc: 3 2 (100.00) :xyz}
3182 do_test printf-2.8.5.8 {
3183 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 100.0
3184 } {abc: 3 2 (1.00e+02) :xyz}
3185 do_test printf-2.8.5.9 {
3186 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 100.0
3187 } {abc: 3 2 (1e+02) :xyz}
3188 do_test printf-2.8.6.1 {
3189 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 9.99999
3190 } {abc: (10.00) :xyz}
3191 do_test printf-2.8.6.2 {
3192 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 9.99999
3193 } {abc: (1.00e+01) :xyz}
3194 do_test printf-2.8.6.3 {
3195 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 9.99999
3197 do_test printf-2.8.6.4 {
3198 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 9.99999
3199 } {abc: 3 2 (9.99999) :xyz}
3200 do_test printf-2.8.6.5 {
3201 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 9.99999
3202 } {abc: 3 2 (9.99999) :xyz}
3203 do_test printf-2.8.6.6 {
3204 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 9.99999
3205 } {abc: 3 2 (0009.99999) :xyz}
3206 do_test printf-2.8.6.7 {
3207 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 9.99999
3208 } {abc: 3 2 (10.00) :xyz}
3209 do_test printf-2.8.6.8 {
3210 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 9.99999
3211 } {abc: 3 2 (1.00e+01) :xyz}
3212 do_test printf-2.8.6.9 {
3213 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 9.99999
3214 } {abc: 3 2 ( 10) :xyz}
3215 do_test printf-2.8.7.1 {
3216 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 -0.00543
3217 } {abc: (-0.01) :xyz}
3218 do_test printf-2.8.7.2 {
3219 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 -0.00543
3220 } {abc: (-5.43e-03) :xyz}
3221 do_test printf-2.8.7.3 {
3222 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 -0.00543
3223 } {abc: (-0.0054) :xyz}
3224 do_test printf-2.8.7.4 {
3225 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 -0.00543
3226 } {abc: 3 2 (-0.00543) :xyz}
3227 do_test printf-2.8.7.5 {
3228 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 -0.00543
3229 } {abc: 3 2 (-0.00543000) :xyz}
3230 do_test printf-2.8.7.6 {
3231 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 -0.00543
3232 } {abc: 3 2 (-000.00543) :xyz}
3233 do_test printf-2.8.7.7 {
3234 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 -0.00543
3235 } {abc: 3 2 (-0.01) :xyz}
3236 do_test printf-2.8.7.8 {
3237 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 -0.00543
3238 } {abc: 3 2 (-5.43e-03) :xyz}
3239 do_test printf-2.8.7.9 {
3240 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 -0.00543
3241 } {abc: 3 2 (-0.0054) :xyz}
3242 do_test printf-2.8.8.1 {
3243 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 -1.0
3244 } {abc: (-1.00) :xyz}
3245 do_test printf-2.8.8.2 {
3246 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 -1.0
3247 } {abc: (-1.00e+00) :xyz}
3248 do_test printf-2.8.8.3 {
3249 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 -1.0
3251 do_test printf-2.8.8.4 {
3252 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 -1.0
3253 } {abc: 3 2 (-1) :xyz}
3254 do_test printf-2.8.8.5 {
3255 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 -1.0
3256 } {abc: 3 2 (-1.00000) :xyz}
3257 do_test printf-2.8.8.6 {
3258 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 -1.0
3259 } {abc: 3 2 (-000000001) :xyz}
3260 do_test printf-2.8.8.7 {
3261 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 -1.0
3262 } {abc: 3 2 (-1.00) :xyz}
3263 do_test printf-2.8.8.8 {
3264 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 -1.0
3265 } {abc: 3 2 (-1.00e+00) :xyz}
3266 do_test printf-2.8.8.9 {
3267 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 -1.0
3268 } {abc: 3 2 ( -1) :xyz}
3269 do_test printf-2.8.9.1 {
3270 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 -99.99999
3271 } {abc: (-100.00) :xyz}
3272 do_test printf-2.8.9.2 {
3273 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 -99.99999
3274 } {abc: (-1.00e+02) :xyz}
3275 do_test printf-2.8.9.3 {
3276 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 -99.99999
3277 } {abc: (-1e+02) :xyz}
3278 do_test printf-2.8.9.4 {
3279 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 -99.99999
3280 } {abc: 3 2 (-100) :xyz}
3281 do_test printf-2.8.9.5 {
3282 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 -99.99999
3283 } {abc: 3 2 (-100.000) :xyz}
3284 do_test printf-2.8.9.6 {
3285 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 -99.99999
3286 } {abc: 3 2 (-000000100) :xyz}
3287 do_test printf-2.8.9.7 {
3288 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 -99.99999
3289 } {abc: 3 2 (-100.00) :xyz}
3290 do_test printf-2.8.9.8 {
3291 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 -99.99999
3292 } {abc: 3 2 (-1.00e+02) :xyz}
3293 do_test printf-2.8.9.9 {
3294 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 -99.99999
3295 } {abc: 3 2 (-1e+02) :xyz}
3296 do_test printf-2.8.10.1 {
3297 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 3.14e+9
3298 } {abc: (3140000000.00) :xyz}
3299 do_test printf-2.8.10.2 {
3300 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 3.14e+9
3301 } {abc: (3.14e+09) :xyz}
3302 do_test printf-2.8.10.3 {
3303 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 3.14e+9
3304 } {abc: (3.1e+09) :xyz}
3305 do_test printf-2.8.10.4 {
3306 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 3.14e+9
3307 } {abc: 3 2 (3.14e+09) :xyz}
3308 do_test printf-2.8.10.5 {
3309 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 3.14e+9
3310 } {abc: 3 2 (3.14000e+09) :xyz}
3311 do_test printf-2.8.10.6 {
3312 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 3.14e+9
3313 } {abc: 3 2 (003.14e+09) :xyz}
3314 do_test printf-2.8.10.7 {
3315 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 3.14e+9
3316 } {abc: 3 2 (3140000000.00) :xyz}
3317 do_test printf-2.8.10.8 {
3318 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 3.14e+9
3319 } {abc: 3 2 (3.14e+09) :xyz}
3320 do_test printf-2.8.10.9 {
3321 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 3.14e+9
3322 } {abc: 3 2 (3.1e+09) :xyz}
3323 do_test printf-2.8.11.2 {
3324 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 -4.72732e+88
3325 } {abc: (-4.73e+88) :xyz}
3326 do_test printf-2.8.11.3 {
3327 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 -4.72732e+88
3328 } {abc: (-4.7e+88) :xyz}
3329 do_test printf-2.8.11.4 {
3330 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 -4.72732e+88
3331 } {abc: 3 2 (-4.72732e+88) :xyz}
3332 do_test printf-2.8.11.5 {
3333 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 -4.72732e+88
3334 } {abc: 3 2 (-4.72732e+88) :xyz}
3335 do_test printf-2.8.11.6 {
3336 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 -4.72732e+88
3337 } {abc: 3 2 (-4.72732e+88) :xyz}
3338 do_test printf-2.8.11.8 {
3339 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 -4.72732e+88
3340 } {abc: 3 2 (-4.73e+88) :xyz}
3341 do_test printf-2.8.11.9 {
3342 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 -4.72732e+88
3343 } {abc: 3 2 (-4.7e+88) :xyz}
3344 do_test printf-2.8.12.2 {
3345 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 9.87991e+143
3346 } {abc: (9.88e+143) :xyz}
3347 do_test printf-2.8.12.3 {
3348 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 9.87991e+143
3349 } {abc: (9.9e+143) :xyz}
3350 do_test printf-2.8.12.4 {
3351 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 9.87991e+143
3352 } {abc: 3 2 (9.87991e+143) :xyz}
3353 do_test printf-2.8.12.5 {
3354 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 9.87991e+143
3355 } {abc: 3 2 (9.87991e+143) :xyz}
3356 do_test printf-2.8.12.6 {
3357 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 9.87991e+143
3358 } {abc: 3 2 (9.87991e+143) :xyz}
3359 do_test printf-2.8.12.8 {
3360 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 9.87991e+143
3361 } {abc: 3 2 (9.88e+143) :xyz}
3362 do_test printf-2.8.12.9 {
3363 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 9.87991e+143
3364 } {abc: 3 2 (9.9e+143) :xyz}
3365 do_test printf-2.8.13.1 {
3366 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 -6.287291e-9
3367 } {abc: (-0.00) :xyz}
3368 do_test printf-2.8.13.2 {
3369 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 -6.287291e-9
3370 } {abc: (-6.29e-09) :xyz}
3371 do_test printf-2.8.13.3 {
3372 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 -6.287291e-9
3373 } {abc: (-6.3e-09) :xyz}
3374 do_test printf-2.8.13.4 {
3375 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 -6.287291e-9
3376 } {abc: 3 2 (-6.28729e-09) :xyz}
3377 do_test printf-2.8.13.5 {
3378 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 -6.287291e-9
3379 } {abc: 3 2 (-6.28729e-09) :xyz}
3380 do_test printf-2.8.13.6 {
3381 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 -6.287291e-9
3382 } {abc: 3 2 (-6.28729e-09) :xyz}
3383 do_test printf-2.8.13.7 {
3384 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 -6.287291e-9
3385 } {abc: 3 2 (-0.00) :xyz}
3386 do_test printf-2.8.13.8 {
3387 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 -6.287291e-9
3388 } {abc: 3 2 (-6.29e-09) :xyz}
3389 do_test printf-2.8.13.9 {
3390 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 -6.287291e-9
3391 } {abc: 3 2 (-6.3e-09) :xyz}
3392 do_test printf-2.8.14.1 {
3393 sqlite3_mprintf_double {abc: (%*.*f) :xyz} 3 2 3.38826392e-110
3394 } {abc: (0.00) :xyz}
3395 do_test printf-2.8.14.2 {
3396 sqlite3_mprintf_double {abc: (%*.*e) :xyz} 3 2 3.38826392e-110
3397 } {abc: (3.39e-110) :xyz}
3398 do_test printf-2.8.14.3 {
3399 sqlite3_mprintf_double {abc: (%*.*g) :xyz} 3 2 3.38826392e-110
3400 } {abc: (3.4e-110) :xyz}
3401 do_test printf-2.8.14.4 {
3402 sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 3 2 3.38826392e-110
3403 } {abc: 3 2 (3.38826e-110) :xyz}
3404 do_test printf-2.8.14.5 {
3405 sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 3 2 3.38826392e-110
3406 } {abc: 3 2 (3.38826e-110) :xyz}
3407 do_test printf-2.8.14.6 {
3408 sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 3 2 3.38826392e-110
3409 } {abc: 3 2 (3.38826e-110) :xyz}
3410 do_test printf-2.8.14.7 {
3411 sqlite3_mprintf_double {abc: %d %d (%3.2f) :xyz} 3 2 3.38826392e-110
3412 } {abc: 3 2 (0.00) :xyz}
3413 do_test printf-2.8.14.8 {
3414 sqlite3_mprintf_double {abc: %d %d (%3.2e) :xyz} 3 2 3.38826392e-110
3415 } {abc: 3 2 (3.39e-110) :xyz}
3416 do_test printf-2.8.14.9 {
3417 sqlite3_mprintf_double {abc: %d %d (%3.2g) :xyz} 3 2 3.38826392e-110
3418 } {abc: 3 2 (3.4e-110) :xyz}
3419 do_test printf-2.8.15.1 {
3420 sqlite3_mprintf_double {abc: (% *.*f) :xyz} 3 2 3.38826392e-110
3421 } {abc: ( 0.00) :xyz}
3422 do_test printf-2.8.15.2 {
3423 sqlite3_mprintf_double {abc: (% *.*e) :xyz} 3 2 3.38826392e-110
3424 } {abc: ( 3.39e-110) :xyz}
3425 do_test printf-2.8.15.3 {
3426 sqlite3_mprintf_double {abc: (% *.*g) :xyz} 3 2 3.38826392e-110
3427 } {abc: ( 3.4e-110) :xyz}
3428 do_test printf-2.8.15.4 {
3429 sqlite3_mprintf_double {abc: %d %d (% g) :xyz} 3 2 3.38826392e-110
3430 } {abc: 3 2 ( 3.38826e-110) :xyz}
3431 do_test printf-2.8.15.5 {
3432 sqlite3_mprintf_double {abc: %d %d (% #g) :xyz} 3 2 3.38826392e-110
3433 } {abc: 3 2 ( 3.38826e-110) :xyz}
3434 do_test printf-2.8.15.6 {
3435 sqlite3_mprintf_double {abc: %d %d (%0 10g) :xyz} 3 2 3.38826392e-110
3436 } {abc: 3 2 ( 3.38826e-110) :xyz}
3437 do_test printf-2.8.15.7 {
3438 sqlite3_mprintf_double {abc: %d %d (% 3.2f) :xyz} 3 2 3.38826392e-110
3439 } {abc: 3 2 ( 0.00) :xyz}
3440 do_test printf-2.8.15.8 {
3441 sqlite3_mprintf_double {abc: %d %d (% 3.2e) :xyz} 3 2 3.38826392e-110
3442 } {abc: 3 2 ( 3.39e-110) :xyz}
3443 do_test printf-2.8.15.9 {
3444 sqlite3_mprintf_double {abc: %d %d (% 3.2g) :xyz} 3 2 3.38826392e-110
3445 } {abc: 3 2 ( 3.4e-110) :xyz}
3447 do_test printf-2.9.1 {
3448 sqlite3_mprintf_double {abc: %d %d (%5.0g) :xyz} 0 0 1.234
3449 } {abc: 0 0 ( 1) :xyz}
3450 do_test printf-2.9.2 {
3451 sqlite3_mprintf_double {abc: %d %d (%+5.0g) :xyz} 0 0 1.234
3452 } {abc: 0 0 ( +1) :xyz}
3453 do_test printf-2.9.3 {
3454 sqlite3_mprintf_double {abc: %d %d (%+-5.0g) :xyz} 0 0 1.234
3455 } {abc: 0 0 (+1 ) :xyz}
3457 do_test printf-2.10.1 {
3458 sqlite3_mprintf_double {abc: %d %d (%-010.5f) :xyz} 0 0 1.234
3459 } {abc: 0 0 (1.23400 ) :xyz}
3460 do_test printf-2.10.2 {
3461 sqlite3_mprintf_double {abc: %d %d (%010.5f) :xyz} 0 0 1.234
3462 } {abc: 0 0 (0001.23400) :xyz}
3463 do_test printf-2.10.3 {
3464 sqlite3_mprintf_double {abc: %d %d (%+010.5f) :xyz} 0 0 1.234
3465 } {abc: 0 0 (+001.23400) :xyz}
3467 do_test printf-3.1 {
3468 sqlite3_mprintf_str {A String: (%*.*s)} 10 10 {This is the string}
3469 } [format {A String: (%*.*s)} 10 10 {This is the string}]
3470 do_test printf-3.2 {
3471 sqlite3_mprintf_str {A String: (%*.*s)} 10 5 {This is the string}
3472 } [format {A String: (%*.*s)} 10 5 {This is the string}]
3473 do_test printf-3.3 {
3474 sqlite3_mprintf_str {A String: (%*.*s)} -10 5 {This is the string}
3475 } [format {A String: (%*.*s)} -10 5 {This is the string}]
3476 do_test printf-3.4 {
3477 sqlite3_mprintf_str {%d %d A String: (%s)} 1 2 {This is the string}
3478 } [format {%d %d A String: (%s)} 1 2 {This is the string}]
3479 do_test printf-3.5 {
3480 sqlite3_mprintf_str {%d %d A String: (%30s)} 1 2 {This is the string}
3481 } [format {%d %d A String: (%30s)} 1 2 {This is the string}]
3482 do_test printf-3.6 {
3483 sqlite3_mprintf_str {%d %d A String: (%-30s)} 1 2 {This is the string}
3484 } [format {%d %d A String: (%-30s)} 1 2 {This is the string}]
3485 do_test printf-3.7 {
3486 sqlite3_mprintf_str {%d A String: (%*s)} 1 2147483647 {This is the string}
3488 do_test printf-3.8 {
3489 sqlite3_mprintf_str {%d A String: (%*s)} 1 -2147483648 {This is the string}
3490 } {1 A String: (This is the string)}
3491 do_test printf-3.9 {
3492 sqlite3_mprintf_str {%d A String: (%.*s)} 1 -2147483648 {This is the string}
3493 } {1 A String: (This is the string)}
3494 do_test snprintf-3.11 {
3495 sqlite3_snprintf_str 2 {x%d %d %s} 10 10 {This is the string}
3497 do_test snprintf-3.12 {
3498 sqlite3_snprintf_str 3 {x%d %d %s} 10 10 {This is the string}
3500 do_test snprintf-3.13 {
3501 sqlite3_snprintf_str 4 {x%d %d %s} 10 10 {This is the string}
3503 do_test snprintf-3.14 {
3504 sqlite3_snprintf_str 5 {x%d %d %s} 10 10 {This is the string}
3506 do_test snprintf-3.15 {
3507 sqlite3_snprintf_str 6 {x%d %d %s} 10 10 {This is the string}
3509 do_test snprintf-3.16 {
3510 sqlite3_snprintf_str 7 {x%d %d %s} 10 10 {This is the string}
3512 do_test snprintf-3.17 {
3513 sqlite3_snprintf_str 8 {x%d %d %s} 10 10 {This is the string}
3515 do_test snprintf-3.18 {
3516 sqlite3_snprintf_str 9 {x%d %d %s} 10 10 {This is the string}
3518 do_test snprintf-3.19 {
3519 sqlite3_snprintf_str 100 {x%d %d %s} 10 10 {This is the string}
3520 } {x10 10 This is the string}
3522 do_test printf-4.1 {
3523 sqlite3_mprintf_str {%d %d A quoted string: '%q'} 1 2 {Hi Y'all}
3524 } {1 2 A quoted string: 'Hi Y''all'}
3525 do_test printf-4.2 {
3526 sqlite3_mprintf_str {%d %d A NULL pointer in %%q: '%q'} 1 2
3527 } {1 2 A NULL pointer in %q: '(NULL)'}
3528 do_test printf-4.3 {
3529 sqlite3_mprintf_str {%d %d A quoted string: %Q} 1 2 {Hi Y'all}
3530 } {1 2 A quoted string: 'Hi Y''all'}
3531 do_test printf-4.4 {
3532 sqlite3_mprintf_str {%d %d A NULL pointer in %%Q: %Q} 1 2
3533 } {1 2 A NULL pointer in %Q: NULL}
3534 do_test printf-4.5 {
3535 sqlite3_mprintf_str {%d %d A quoted string: '%.10q'} 1 2 {Hi Y'all}
3536 } {1 2 A quoted string: 'Hi Y''all'}
3537 do_test printf-4.6 {
3538 sqlite3_mprintf_str {%d %d A quoted string: '%.9q'} 1 2 {Hi Y'all}
3539 } {1 2 A quoted string: 'Hi Y''all'}
3540 do_test printf-4.7 {
3541 sqlite3_mprintf_str {%d %d A quoted string: '%.8q'} 1 2 {Hi Y'all}
3542 } {1 2 A quoted string: 'Hi Y''all'}
3543 do_test printf-4.8 {
3544 sqlite3_mprintf_str {%d %d A quoted string: '%.7q'} 1 2 {Hi Y'all}
3545 } {1 2 A quoted string: 'Hi Y''al'}
3546 do_test printf-4.9 {
3547 sqlite3_mprintf_str {%d %d A quoted string: '%.6q'} 1 2 {Hi Y'all}
3548 } {1 2 A quoted string: 'Hi Y''a'}
3549 do_test printf-4.10 {
3550 sqlite3_mprintf_str {%d %d A quoted string: '%.5q'} 1 2 {Hi Y'all}
3551 } {1 2 A quoted string: 'Hi Y'''}
3552 do_test printf-4.11 {
3553 sqlite3_mprintf_str {%d %d A quoted string: '%.4q'} 1 2 {Hi Y'all}
3554 } {1 2 A quoted string: 'Hi Y'}
3555 do_test printf-4.12 {
3556 sqlite3_mprintf_str {%d %d A quoted string: '%.3q'} 1 2 {Hi Y'all}
3557 } {1 2 A quoted string: 'Hi '}
3558 do_test printf-4.13 {
3559 sqlite3_mprintf_str {%d %d A quoted string: '%.2q'} 1 2 {Hi Y'all}
3560 } {1 2 A quoted string: 'Hi'}
3561 do_test printf-4.14 {
3562 sqlite3_mprintf_str {%d %d A quoted string: '%.1q'} 1 2 {Hi Y'all}
3563 } {1 2 A quoted string: 'H'}
3564 do_test printf-4.15 {
3565 sqlite3_mprintf_str {%d %d A quoted string: '%.0q'} 1 2 {Hi Y'all}
3566 } {1 2 A quoted string: ''}
3567 do_test printf-4.16 {
3568 sqlite3_mprintf_str {%d A quoted string: '%.*q'} 1 6 {Hi Y'all}
3569 } {1 A quoted string: 'Hi Y''a'}
3572 do_test printf-5.1 {
3573 set x [sqlite3_mprintf_str {%d %d %100000s} 0 0 {Hello}]
3576 do_test printf-5.2 {
3577 sqlite3_mprintf_str {%d %d (%-10.10s) %} -9 -10 {HelloHelloHello}
3578 } {-9 -10 (HelloHello) %}
3580 do_test printf-6.1 {
3581 sqlite3_mprintf_z_test , one two three four five six
3582 } {,one,two,three,four,five,six}
3585 do_test printf-7.1 {
3586 sqlite3_mprintf_scaled {A double: %g} 1.0e307 1.0
3587 } {A double: 1e+307}
3588 do_test printf-7.2 {
3589 sqlite3_mprintf_scaled {A double: %g} 1.0e307 10.0
3590 } {A double: 1e+308}
3591 do_test printf-7.3 {
3592 sqlite3_mprintf_scaled {A double: %g} 1.0e307 100.0
3594 do_test printf-7.4 {
3595 sqlite3_mprintf_scaled {A double: %g} -1.0e307 100.0
3597 do_test printf-7.5 {
3598 sqlite3_mprintf_scaled {A double: %+g} 1.0e307 100.0
3601 do_test printf-8.1 {
3602 sqlite3_mprintf_int {%u %u %u} 0x7fffffff 0x80000000 0xffffffff
3603 } {2147483647 2147483648 4294967295}
3604 do_test printf-8.2 {
3605 sqlite3_mprintf_long {%lu %lu %lu} 0x7fffffff 0x80000000 0xffffffff
3606 } {2147483647 2147483648 4294967295}
3607 do_test printf-8.3 {
3608 sqlite3_mprintf_int64 {%llu %llu %llu} 2147483647 2147483648 4294967296
3609 } {2147483647 2147483648 4294967296}
3610 do_test printf-8.4 {
3611 sqlite3_mprintf_int64 {%lld %lld %lld} 2147483647 2147483648 4294967296
3612 } {2147483647 2147483648 4294967296}
3613 do_test printf-8.5 {
3614 sqlite3_mprintf_int64 {%llx %llx %llx} 2147483647 2147483648 4294967296
3615 } {7fffffff 80000000 100000000}
3616 do_test printf-8.6 {
3617 sqlite3_mprintf_int64 {%llx %llo %lld} -1 -1 -1
3618 } {ffffffffffffffff 1777777777777777777777 -1}
3619 do_test printf-8.7 {
3620 sqlite3_mprintf_int64 {%llx %llx %llx} +2147483647 +2147483648 +4294967296
3621 } {7fffffff 80000000 100000000}
3623 do_test printf-9.1 {
3624 sqlite3_mprintf_int {%*.*c} 4 4 65
3626 do_test printf-9.2 {
3627 sqlite3_mprintf_int {%*.*c} -4 1 66
3629 do_test printf-9.3 {
3630 sqlite3_mprintf_int {%*.*c} 4 1 67
3632 do_test printf-9.4 {
3633 sqlite3_mprintf_int {%d %d %c} 4 1 67
3636 set fifty $ten$ten$ten$ten$ten
3637 do_test printf-9.5 {
3638 sqlite3_mprintf_int {%d %*c} 1 -201 67
3639 } "1 C$fifty$fifty$fifty$fifty"
3640 do_test printf-9.6 {
3641 sqlite3_mprintf_int {hi%12345.12346yhello} 0 0 0
3646 do_test printf-10.1 {
3647 sqlite3_mprintf_stronly %s {}
3652 do_test printf-10.2 {
3653 sqlite3_mprintf_stronly %q {}
3656 # Ticket #1340: Test for loss of precision on large positive exponents
3658 do_test printf-10.3 {
3659 sqlite3_mprintf_double {%d %d %f} 1 1 1e300
3660 } {1 1 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000}
3662 # The non-standard '!' flag on a 'g' conversion forces a decimal point
3663 # and at least one digit on either side of the decimal point.
3665 do_test printf-11.1 {
3666 sqlite3_mprintf_double {%d %d %!g} 1 1 1
3668 do_test printf-11.2 {
3669 sqlite3_mprintf_double {%d %d %!g} 1 1 123
3671 do_test printf-11.3 {
3672 sqlite3_mprintf_double {%d %d %!g} 1 1 12.3
3674 do_test printf-11.4 {
3675 sqlite3_mprintf_double {%d %d %!g} 1 1 0.123
3677 do_test printf-11.5 {
3678 sqlite3_mprintf_double {%d %d %!.15g} 1 1 1
3680 do_test printf-11.6 {
3681 sqlite3_mprintf_double {%d %d %!.15g} 1 1 1e10
3682 } {1 1 10000000000.0}
3683 do_test printf-11.7 {
3684 sqlite3_mprintf_double {%d %d %!.15g} 1 1 1e300
3687 # Additional tests for coverage
3689 do_test printf-12.1 {
3690 sqlite3_mprintf_double {%d %d %.2000g} 1 1 1.0
3693 # Floating point boundary cases
3695 do_test printf-13.1 {
3696 sqlite3_mprintf_hexdouble %.20f 4024000000000000
3697 } {10.00000000000000000000}
3698 do_test printf-13.2 {
3699 sqlite3_mprintf_hexdouble %.20f 4197d78400000000
3700 } {100000000.00000000000000000000}
3701 do_test printf-13.3 {
3702 sqlite3_mprintf_hexdouble %.20f 4693b8b5b5056e17
3703 } {100000000000000000000000000000000.00000000000000000000}
3704 do_test printf-13.4 {
3705 sqlite3_mprintf_hexdouble %.20f 7ff0000000000000
3707 do_test printf-13.5 {
3708 sqlite3_mprintf_hexdouble %.20f fff0000000000000
3710 do_test printf-13.6 {
3711 sqlite3_mprintf_hexdouble %.20f fff8000000000000
3713 do_test printf-13.7 {
3714 sqlite3_mprintf_hexdouble %2147483648.10000f 4693b8b5b5056e17
3715 } {/100000000000000000000000000000000.00/}
3717 do_test printf-14.1 {
3718 sqlite3_mprintf_str {abc-%y-123} 0 0 {not used}
3720 do_test printf-14.2 {
3721 sqlite3_mprintf_n_test {xyzzy}
3723 do_test printf-14.3 {
3724 sqlite3_mprintf_str {abc-%T-123} 0 0 {not used}
3726 do_test printf-14.4 {
3727 sqlite3_mprintf_str {abc-%#} 0 0 {not used}
3729 do_test printf-14.5 {
3730 sqlite3_mprintf_str {abc-%*.*s-xyz} 10 -10 {a_very_long_string}
3731 } {abc-a_very_lon-xyz}
3732 do_test printf-14.6 {
3733 sqlite3_mprintf_str {abc-%5.10/} 0 0 {not used}
3735 do_test printf-14.7 {
3736 sqlite3_mprintf_str {abc-%05.5d} 123 0 {not used}
3738 do_test printf-14.8 {
3739 sqlite3_mprintf_str {abc-%05.5d} 1234567 0 {not used}
3742 for {set i 2} {$i<200} {incr i} {
3743 set res [string repeat { } [expr {$i-1}]]x
3744 do_test printf-14.90.$i "
3745 sqlite3_mprintf_str {%*.*s} $i 500 x
3749 do_test printf-15.1 {
3750 sqlite3_snprintf_int 5 {12345} 0
3752 do_test printf-15.2 {
3753 sqlite3_snprintf_int 5 {} 0
3755 do_test printf-15.3 {
3756 sqlite3_snprintf_int 0 {} 0
3757 } {abcdefghijklmnopqrstuvwxyz}
3759 # Now test malloc() failure within a sqlite3_mprintf():
3761 foreach var {a b c d} {
3762 set $var [string repeat $var 400]
3764 set str1 "[string repeat A 360]%d%d%s"
3765 set str2 [string repeat B 5000]
3766 set zSuccess "[string repeat A 360]11[string repeat B 5000]"
3767 foreach ::iRepeat {0 1} {
3770 sqlite3_memdebug_fail $nTestNum -repeat $::iRepeat
3771 set z [sqlite3_mprintf_str $str1 1 1 $str2]
3772 set nFail [sqlite3_memdebug_fail -1 -benign nBenign]
3773 do_test printf-malloc-$::iRepeat.$nTestNum {
3774 expr {($nFail>0 && $z eq "") || ($nFail==$nBenign && $z eq $zSuccess)}
3776 if {$nFail == 0} break
3782 # ticket 23439ea582241138
3784 do_execsql_test printf-16.1 {
3785 SELECT printf('%.*g',2147483647,0.01);
3788 # 2023-02-23 https://sqlite.org/forum/forumpost/d1387c3979c7f557
3789 # Loss of precision when doing floating-point to decimal
3790 # conversions on values that have no factional part.
3792 do_execsql_test printf-17.1 {
3793 SELECT format('%!.20g', 13.0);
3795 do_execsql_test printf-17.2 {
3796 SELECT format('%.3e', 199990000.0);
3798 do_execsql_test printf-17.3 {
3799 SELECT format('%.3f', 199990000.0);
3801 do_execsql_test printf-17.4 {
3802 SELECT format('%.3g', 199990000.0);
3804 do_execsql_test printf-17.5 {
3805 SELECT format('%.4e', 199990000.0);
3807 do_execsql_test printf-17.6 {
3808 SELECT format('%.4f', 199990000.0);
3810 do_execsql_test printf-17.7 {
3811 SELECT format('%.4g', 199990000.0);
3813 do_execsql_test printf-17.8 {
3814 SELECT format('%.5e', 199990000.0);
3816 do_execsql_test printf-17.9 {
3817 SELECT format('%.5f', 199990000.0);
3819 do_execsql_test printf-17.10 {
3820 SELECT format('%.5g', 199990000.0);
3822 do_execsql_test printf-17.11 {
3823 SELECT format('%.30f',1.0000000000000000076e-50);
3824 } 0.000000000000000000000000000000
3826 #-------------------------------------------------------------------------
3827 # dbsqlfuzz ad651aad4bb2100f3a724129a555d8d773366d46
3831 sqlite3_db_config_lookaside db 0 0 0
3832 do_execsql_test printf-18.1 {
3833 SELECT length( format('%,.249f', -5.0e-300) );