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