modernc.org/cc@v1.0.1/v2/testdata/_sqlite/test/printf.test (about)

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