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