PageRenderTime 41ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/src/sqlite/test/printf.test

#
Unknown | 3755 lines | 3730 code | 25 blank | 0 comment | 0 complexity | 4e9b81831e3368581a54224f96408596 MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

   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
  16set testdir [file dirname $argv0]
  17source $testdir/tester.tcl
  18
  19
  20do_test printf-1.1.1 {
  21  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
  22       1 1 1
  23} {abc: 1 1 1 :xyz}
  24do_test printf-1.1.2 {
  25  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
  26       1 1 1
  27} {abc: (     1) (     1) (     1) :xyz}
  28do_test printf-1.1.3 {
  29  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
  30       1 1 1
  31} {abc: (1     ) (1     ) (1     ) :xyz}
  32do_test printf-1.1.4 {
  33  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
  34       1 1 1
  35} {abc: (    +1) (     1) (     1) :xyz}
  36do_test printf-1.1.5 {
  37  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
  38       1 1 1
  39} {abc: (000001) (000001) (000001) :xyz}
  40do_test printf-1.1.6 {
  41  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
  42       1 1 1
  43} {abc: (     1) (     1) (     1) :xyz}
  44do_test printf-1.1.7 {
  45  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
  46       1 1 1
  47} {abc: (     1) (   0x1) (    01) :xyz}
  48do_test printf-1.2.1 {
  49  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
  50       2 2 2
  51} {abc: 2 2 2 :xyz}
  52do_test printf-1.2.2 {
  53  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
  54       2 2 2
  55} {abc: (     2) (     2) (     2) :xyz}
  56do_test printf-1.2.3 {
  57  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
  58       2 2 2
  59} {abc: (2     ) (2     ) (2     ) :xyz}
  60do_test printf-1.2.4 {
  61  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
  62       2 2 2
  63} {abc: (    +2) (     2) (     2) :xyz}
  64do_test printf-1.2.5 {
  65  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
  66       2 2 2
  67} {abc: (000002) (000002) (000002) :xyz}
  68do_test printf-1.2.6 {
  69  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
  70       2 2 2
  71} {abc: (     2) (     2) (     2) :xyz}
  72do_test printf-1.2.7 {
  73  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
  74       2 2 2
  75} {abc: (     2) (   0x2) (    02) :xyz}
  76do_test printf-1.3.1 {
  77  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
  78       5 5 5
  79} {abc: 5 5 5 :xyz}
  80do_test printf-1.3.2 {
  81  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
  82       5 5 5
  83} {abc: (     5) (     5) (     5) :xyz}
  84do_test printf-1.3.3 {
  85  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
  86       5 5 5
  87} {abc: (5     ) (5     ) (5     ) :xyz}
  88do_test printf-1.3.4 {
  89  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
  90       5 5 5
  91} {abc: (    +5) (     5) (     5) :xyz}
  92do_test printf-1.3.5 {
  93  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
  94       5 5 5
  95} {abc: (000005) (000005) (000005) :xyz}
  96do_test printf-1.3.6 {
  97  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
  98       5 5 5
  99} {abc: (     5) (     5) (     5) :xyz}
 100do_test printf-1.3.7 {
 101  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 102       5 5 5
 103} {abc: (     5) (   0x5) (    05) :xyz}
 104do_test printf-1.4.1 {
 105  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 106       10 10 10
 107} {abc: 10 a 12 :xyz}
 108do_test printf-1.4.2 {
 109  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 110       10 10 10
 111} {abc: (    10) (     a) (    12) :xyz}
 112do_test printf-1.4.3 {
 113  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 114       10 10 10
 115} {abc: (10    ) (a     ) (12    ) :xyz}
 116do_test printf-1.4.4 {
 117  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 118       10 10 10
 119} {abc: (   +10) (     a) (    12) :xyz}
 120do_test printf-1.4.5 {
 121  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 122       10 10 10
 123} {abc: (000010) (00000a) (000012) :xyz}
 124do_test printf-1.4.6 {
 125  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 126       10 10 10
 127} {abc: (    10) (     a) (    12) :xyz}
 128do_test printf-1.4.7 {
 129  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 130       10 10 10
 131} {abc: (    10) (   0xa) (   012) :xyz}
 132do_test printf-1.5.1 {
 133  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 134       99 99 99
 135} {abc: 99 63 143 :xyz}
 136do_test printf-1.5.2 {
 137  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 138       99 99 99
 139} {abc: (    99) (    63) (   143) :xyz}
 140do_test printf-1.5.3 {
 141  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 142       99 99 99
 143} {abc: (99    ) (63    ) (143   ) :xyz}
 144do_test printf-1.5.4 {
 145  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 146       99 99 99
 147} {abc: (   +99) (    63) (   143) :xyz}
 148do_test printf-1.5.5 {
 149  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 150       99 99 99
 151} {abc: (000099) (000063) (000143) :xyz}
 152do_test printf-1.5.6 {
 153  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 154       99 99 99
 155} {abc: (    99) (    63) (   143) :xyz}
 156do_test printf-1.5.7 {
 157  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 158       99 99 99
 159} {abc: (    99) (  0x63) (  0143) :xyz}
 160do_test printf-1.6.1 {
 161  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 162       100 100 100
 163} {abc: 100 64 144 :xyz}
 164do_test printf-1.6.2 {
 165  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 166       100 100 100
 167} {abc: (   100) (    64) (   144) :xyz}
 168do_test printf-1.6.3 {
 169  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 170       100 100 100
 171} {abc: (100   ) (64    ) (144   ) :xyz}
 172do_test printf-1.6.4 {
 173  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 174       100 100 100
 175} {abc: (  +100) (    64) (   144) :xyz}
 176do_test printf-1.6.5 {
 177  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 178       100 100 100
 179} {abc: (000100) (000064) (000144) :xyz}
 180do_test printf-1.6.6 {
 181  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 182       100 100 100
 183} {abc: (   100) (    64) (   144) :xyz}
 184do_test printf-1.6.7 {
 185  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 186       100 100 100
 187} {abc: (   100) (  0x64) (  0144) :xyz}
 188do_test printf-1.7.1 {
 189  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 190       1000000 1000000 1000000
 191} {abc: 1000000 f4240 3641100 :xyz}
 192do_test printf-1.7.2 {
 193  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 194       1000000 1000000 1000000
 195} {abc: (1000000) ( f4240) (3641100) :xyz}
 196do_test printf-1.7.3 {
 197  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 198       1000000 1000000 1000000
 199} {abc: (1000000) (f4240 ) (3641100) :xyz}
 200do_test printf-1.7.4 {
 201  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 202       1000000 1000000 1000000
 203} {abc: (+1000000) ( f4240) (3641100) :xyz}
 204do_test printf-1.7.5 {
 205  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 206       1000000 1000000 1000000
 207} {abc: (1000000) (0f4240) (3641100) :xyz}
 208do_test printf-1.7.6 {
 209  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 210       1000000 1000000 1000000
 211} {abc: ( 1000000) ( f4240) (3641100) :xyz}
 212do_test printf-1.7.7 {
 213  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 214       1000000 1000000 1000000
 215} {abc: (1000000) (0xf4240) (03641100) :xyz}
 216do_test printf-1.8.1 {
 217  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 218       999999999 999999999 999999999
 219} {abc: 999999999 3b9ac9ff 7346544777 :xyz}
 220do_test printf-1.8.2 {
 221  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 222       999999999 999999999 999999999
 223} {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
 224do_test printf-1.8.3 {
 225  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 226       999999999 999999999 999999999
 227} {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
 228do_test printf-1.8.4 {
 229  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 230       999999999 999999999 999999999
 231} {abc: (+999999999) (3b9ac9ff) (7346544777) :xyz}
 232do_test printf-1.8.5 {
 233  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 234       999999999 999999999 999999999
 235} {abc: (999999999) (3b9ac9ff) (7346544777) :xyz}
 236do_test printf-1.8.6 {
 237  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 238       999999999 999999999 999999999
 239} {abc: ( 999999999) (3b9ac9ff) (7346544777) :xyz}
 240do_test printf-1.8.7 {
 241  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 242       999999999 999999999 999999999
 243} {abc: (999999999) (0x3b9ac9ff) (07346544777) :xyz}
 244do_test printf-1.9.1 {
 245  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 246       0 0 0
 247} {abc: 0 0 0 :xyz}
 248do_test printf-1.9.2 {
 249  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 250       0 0 0
 251} {abc: (     0) (     0) (     0) :xyz}
 252do_test printf-1.9.3 {
 253  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 254       0 0 0
 255} {abc: (0     ) (0     ) (0     ) :xyz}
 256do_test printf-1.9.4 {
 257  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 258       0 0 0
 259} {abc: (    +0) (     0) (     0) :xyz}
 260do_test printf-1.9.5 {
 261  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 262       0 0 0
 263} {abc: (000000) (000000) (000000) :xyz}
 264do_test printf-1.9.6 {
 265  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 266       0 0 0
 267} {abc: (     0) (     0) (     0) :xyz}
 268do_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
 273do_test printf-1.10.1 {
 274  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 275       0xffffffff 0xffffffff 0xffffffff
 276} {abc: -1 ffffffff 37777777777 :xyz}
 277do_test printf-1.10.2 {
 278  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 279       0xffffffff 0xffffffff 0xffffffff
 280} {abc: (    -1) (ffffffff) (37777777777) :xyz}
 281do_test printf-1.10.3 {
 282  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 283       0xffffffff 0xffffffff 0xffffffff
 284} {abc: (-1    ) (ffffffff) (37777777777) :xyz}
 285do_test printf-1.10.4 {
 286  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 287       0xffffffff 0xffffffff 0xffffffff
 288} {abc: (    -1) (ffffffff) (37777777777) :xyz}
 289do_test printf-1.10.5 {
 290  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 291       0xffffffff 0xffffffff 0xffffffff
 292} {abc: (-00001) (ffffffff) (37777777777) :xyz}
 293do_test printf-1.10.6 {
 294  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 295       0xffffffff 0xffffffff 0xffffffff
 296} {abc: (    -1) (ffffffff) (37777777777) :xyz}
 297do_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
 302do_test printf-1.11.1 {
 303  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 304       0xfffffffe 0xfffffffe 0xfffffffe
 305} {abc: -2 fffffffe 37777777776 :xyz}
 306do_test printf-1.11.2 {
 307  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 308       0xfffffffe 0xfffffffe 0xfffffffe
 309} {abc: (    -2) (fffffffe) (37777777776) :xyz}
 310do_test printf-1.11.3 {
 311  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 312       0xfffffffe 0xfffffffe 0xfffffffe
 313} {abc: (-2    ) (fffffffe) (37777777776) :xyz}
 314do_test printf-1.11.4 {
 315  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 316       0xfffffffe 0xfffffffe 0xfffffffe
 317} {abc: (    -2) (fffffffe) (37777777776) :xyz}
 318do_test printf-1.11.5 {
 319  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 320       0xfffffffe 0xfffffffe 0xfffffffe
 321} {abc: (-00002) (fffffffe) (37777777776) :xyz}
 322do_test printf-1.11.6 {
 323  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 324       0xfffffffe 0xfffffffe 0xfffffffe
 325} {abc: (    -2) (fffffffe) (37777777776) :xyz}
 326do_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
 331do_test printf-1.12.1 {
 332  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 333       0xfffffffb 0xfffffffb 0xfffffffb
 334} {abc: -5 fffffffb 37777777773 :xyz}
 335do_test printf-1.12.2 {
 336  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 337       0xfffffffb 0xfffffffb 0xfffffffb
 338} {abc: (    -5) (fffffffb) (37777777773) :xyz}
 339do_test printf-1.12.3 {
 340  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 341       0xfffffffb 0xfffffffb 0xfffffffb
 342} {abc: (-5    ) (fffffffb) (37777777773) :xyz}
 343do_test printf-1.12.4 {
 344  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 345       0xfffffffb 0xfffffffb 0xfffffffb
 346} {abc: (    -5) (fffffffb) (37777777773) :xyz}
 347do_test printf-1.12.5 {
 348  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 349       0xfffffffb 0xfffffffb 0xfffffffb
 350} {abc: (-00005) (fffffffb) (37777777773) :xyz}
 351do_test printf-1.12.6 {
 352  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 353       0xfffffffb 0xfffffffb 0xfffffffb
 354} {abc: (    -5) (fffffffb) (37777777773) :xyz}
 355do_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
 360do_test printf-1.13.1 {
 361  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 362       0xfffffff6 0xfffffff6 0xfffffff6
 363} {abc: -10 fffffff6 37777777766 :xyz}
 364do_test printf-1.13.2 {
 365  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 366       0xfffffff6 0xfffffff6 0xfffffff6
 367} {abc: (   -10) (fffffff6) (37777777766) :xyz}
 368do_test printf-1.13.3 {
 369  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 370       0xfffffff6 0xfffffff6 0xfffffff6
 371} {abc: (-10   ) (fffffff6) (37777777766) :xyz}
 372do_test printf-1.13.4 {
 373  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 374       0xfffffff6 0xfffffff6 0xfffffff6
 375} {abc: (   -10) (fffffff6) (37777777766) :xyz}
 376do_test printf-1.13.5 {
 377  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 378       0xfffffff6 0xfffffff6 0xfffffff6
 379} {abc: (-00010) (fffffff6) (37777777766) :xyz}
 380do_test printf-1.13.6 {
 381  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 382       0xfffffff6 0xfffffff6 0xfffffff6
 383} {abc: (   -10) (fffffff6) (37777777766) :xyz}
 384do_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
 389do_test printf-1.14.1 {
 390  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 391       0xffffff9d 0xffffff9d 0xffffff9d
 392} {abc: -99 ffffff9d 37777777635 :xyz}
 393do_test printf-1.14.2 {
 394  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 395       0xffffff9d 0xffffff9d 0xffffff9d
 396} {abc: (   -99) (ffffff9d) (37777777635) :xyz}
 397do_test printf-1.14.3 {
 398  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 399       0xffffff9d 0xffffff9d 0xffffff9d
 400} {abc: (-99   ) (ffffff9d) (37777777635) :xyz}
 401do_test printf-1.14.4 {
 402  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 403       0xffffff9d 0xffffff9d 0xffffff9d
 404} {abc: (   -99) (ffffff9d) (37777777635) :xyz}
 405do_test printf-1.14.5 {
 406  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 407       0xffffff9d 0xffffff9d 0xffffff9d
 408} {abc: (-00099) (ffffff9d) (37777777635) :xyz}
 409do_test printf-1.14.6 {
 410  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 411       0xffffff9d 0xffffff9d 0xffffff9d
 412} {abc: (   -99) (ffffff9d) (37777777635) :xyz}
 413do_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
 418do_test printf-1.15.1 {
 419  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 420       0xffffff9c 0xffffff9c 0xffffff9c
 421} {abc: -100 ffffff9c 37777777634 :xyz}
 422do_test printf-1.15.2 {
 423  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 424       0xffffff9c 0xffffff9c 0xffffff9c
 425} {abc: (  -100) (ffffff9c) (37777777634) :xyz}
 426do_test printf-1.15.3 {
 427  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 428       0xffffff9c 0xffffff9c 0xffffff9c
 429} {abc: (-100  ) (ffffff9c) (37777777634) :xyz}
 430do_test printf-1.15.4 {
 431  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 432       0xffffff9c 0xffffff9c 0xffffff9c
 433} {abc: (  -100) (ffffff9c) (37777777634) :xyz}
 434do_test printf-1.15.5 {
 435  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 436       0xffffff9c 0xffffff9c 0xffffff9c
 437} {abc: (-00100) (ffffff9c) (37777777634) :xyz}
 438do_test printf-1.15.6 {
 439  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 440       0xffffff9c 0xffffff9c 0xffffff9c
 441} {abc: (  -100) (ffffff9c) (37777777634) :xyz}
 442do_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
 447do_test printf-1.16.1 {
 448  sqlite3_mprintf_int {abc: %d %x %o :xyz}\
 449       0xff676981 0xff676981 0xff676981
 450} {abc: -9999999 ff676981 37731664601 :xyz}
 451do_test printf-1.16.2 {
 452  sqlite3_mprintf_int {abc: (%6d) (%6x) (%6o) :xyz}\
 453       0xff676981 0xff676981 0xff676981
 454} {abc: (-9999999) (ff676981) (37731664601) :xyz}
 455do_test printf-1.16.3 {
 456  sqlite3_mprintf_int {abc: (%-6d) (%-6x) (%-6o) :xyz}\
 457       0xff676981 0xff676981 0xff676981
 458} {abc: (-9999999) (ff676981) (37731664601) :xyz}
 459do_test printf-1.16.4 {
 460  sqlite3_mprintf_int {abc: (%+6d) (%+6x) (%+6o) :xyz}\
 461       0xff676981 0xff676981 0xff676981
 462} {abc: (-9999999) (ff676981) (37731664601) :xyz}
 463do_test printf-1.16.5 {
 464  sqlite3_mprintf_int {abc: (%06d) (%06x) (%06o) :xyz}\
 465       0xff676981 0xff676981 0xff676981
 466} {abc: (-9999999) (ff676981) (37731664601) :xyz}
 467do_test printf-1.16.6 {
 468  sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\
 469       0xff676981 0xff676981 0xff676981
 470} {abc: (-9999999) (ff676981) (37731664601) :xyz}
 471do_test printf-1.16.7 {
 472  sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\
 473       0xff676981 0xff676981 0xff676981
 474} {abc: (-9999999) (0xff676981) (037731664601) :xyz}
 475do_test printf-2.1.1.1 {
 476  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 0.001
 477} {abc: (0.0) :xyz}
 478do_test printf-2.1.1.2 {
 479  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 0.001
 480} {abc: (1.0e-03) :xyz}
 481do_test printf-2.1.1.3 {
 482  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 0.001
 483} {abc: (0.001) :xyz}
 484do_test printf-2.1.1.4 {
 485  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 0.001
 486} {abc: 1 1 (0.001) :xyz}
 487do_test printf-2.1.1.5 {
 488  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 0.001
 489} {abc: 1 1 (0.00100000) :xyz}
 490do_test printf-2.1.1.6 {
 491  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 0.001
 492} {abc: 1 1 (000000.001) :xyz}
 493do_test printf-2.1.1.7 {
 494  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 0.001
 495} {abc: 1 1 (0.0) :xyz}
 496do_test printf-2.1.1.8 {
 497  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 0.001
 498} {abc: 1 1 (1.0e-03) :xyz}
 499do_test printf-2.1.1.9 {
 500  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 0.001
 501} {abc: 1 1 (0.001) :xyz}
 502do_test printf-2.1.2.1 {
 503  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 1.0e-20
 504} {abc: (0.0) :xyz}
 505do_test printf-2.1.2.2 {
 506  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 1.0e-20
 507} {abc: (1.0e-20) :xyz}
 508do_test printf-2.1.2.3 {
 509  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 1.0e-20
 510} {abc: (1e-20) :xyz}
 511do_test printf-2.1.2.4 {
 512  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 1.0e-20
 513} {abc: 1 1 (1e-20) :xyz}
 514do_test printf-2.1.2.5 {
 515  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 1.0e-20
 516} {abc: 1 1 (1.00000e-20) :xyz}
 517do_test printf-2.1.2.6 {
 518  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 1.0e-20
 519} {abc: 1 1 (000001e-20) :xyz}
 520do_test printf-2.1.2.7 {
 521  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 1.0e-20
 522} {abc: 1 1 (0.0) :xyz}
 523do_test printf-2.1.2.8 {
 524  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 1.0e-20
 525} {abc: 1 1 (1.0e-20) :xyz}
 526do_test printf-2.1.2.9 {
 527  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 1.0e-20
 528} {abc: 1 1 (1e-20) :xyz}
 529do_test printf-2.1.3.1 {
 530  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 1.0
 531} {abc: (1.0) :xyz}
 532do_test printf-2.1.3.2 {
 533  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 1.0
 534} {abc: (1.0e+00) :xyz}
 535do_test printf-2.1.3.3 {
 536  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 1.0
 537} {abc: (1) :xyz}
 538do_test printf-2.1.3.4 {
 539  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 1.0
 540} {abc: 1 1 (1) :xyz}
 541do_test printf-2.1.3.5 {
 542  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 1.0
 543} {abc: 1 1 (1.00000) :xyz}
 544do_test printf-2.1.3.6 {
 545  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 1.0
 546} {abc: 1 1 (0000000001) :xyz}
 547do_test printf-2.1.3.7 {
 548  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 1.0
 549} {abc: 1 1 (1.0) :xyz}
 550do_test printf-2.1.3.8 {
 551  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 1.0
 552} {abc: 1 1 (1.0e+00) :xyz}
 553do_test printf-2.1.3.9 {
 554  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 1.0
 555} {abc: 1 1 (1) :xyz}
 556do_test printf-2.1.4.1 {
 557  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 0.0
 558} {abc: (0.0) :xyz}
 559do_test printf-2.1.4.2 {
 560  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 0.0
 561} {abc: (0.0e+00) :xyz}
 562do_test printf-2.1.4.3 {
 563  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 0.0
 564} {abc: (0) :xyz}
 565do_test printf-2.1.4.4 {
 566  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 0.0
 567} {abc: 1 1 (0) :xyz}
 568do_test printf-2.1.4.5 {
 569  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 0.0
 570} {abc: 1 1 (0.00000) :xyz}
 571do_test printf-2.1.4.6 {
 572  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 0.0
 573} {abc: 1 1 (0000000000) :xyz}
 574do_test printf-2.1.4.7 {
 575  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 0.0
 576} {abc: 1 1 (0.0) :xyz}
 577do_test printf-2.1.4.8 {
 578  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 0.0
 579} {abc: 1 1 (0.0e+00) :xyz}
 580do_test printf-2.1.4.9 {
 581  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 0.0
 582} {abc: 1 1 (0) :xyz}
 583do_test printf-2.1.5.1 {
 584  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 100.0
 585} {abc: (100.0) :xyz}
 586do_test printf-2.1.5.2 {
 587  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 100.0
 588} {abc: (1.0e+02) :xyz}
 589do_test printf-2.1.5.3 {
 590  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 100.0
 591} {abc: (1e+02) :xyz}
 592do_test printf-2.1.5.4 {
 593  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 100.0
 594} {abc: 1 1 (100) :xyz}
 595do_test printf-2.1.5.5 {
 596  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 100.0
 597} {abc: 1 1 (100.000) :xyz}
 598do_test printf-2.1.5.6 {
 599  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 100.0
 600} {abc: 1 1 (0000000100) :xyz}
 601do_test printf-2.1.5.7 {
 602  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 100.0
 603} {abc: 1 1 (100.0) :xyz}
 604do_test printf-2.1.5.8 {
 605  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 100.0
 606} {abc: 1 1 (1.0e+02) :xyz}
 607do_test printf-2.1.5.9 {
 608  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 100.0
 609} {abc: 1 1 (1e+02) :xyz}
 610do_test printf-2.1.6.1 {
 611  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 9.99999
 612} {abc: (10.0) :xyz}
 613do_test printf-2.1.6.2 {
 614  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 9.99999
 615} {abc: (1.0e+01) :xyz}
 616do_test printf-2.1.6.3 {
 617  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 9.99999
 618} {abc: (1e+01) :xyz}
 619do_test printf-2.1.6.4 {
 620  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 9.99999
 621} {abc: 1 1 (9.99999) :xyz}
 622do_test printf-2.1.6.5 {
 623  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 9.99999
 624} {abc: 1 1 (9.99999) :xyz}
 625do_test printf-2.1.6.6 {
 626  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 9.99999
 627} {abc: 1 1 (0009.99999) :xyz}
 628do_test printf-2.1.6.7 {
 629  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 9.99999
 630} {abc: 1 1 (10.0) :xyz}
 631do_test printf-2.1.6.8 {
 632  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 9.99999
 633} {abc: 1 1 (1.0e+01) :xyz}
 634do_test printf-2.1.6.9 {
 635  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 9.99999
 636} {abc: 1 1 (1e+01) :xyz}
 637do_test printf-2.1.7.1 {
 638  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -0.00543
 639} {abc: (-0.0) :xyz}
 640do_test printf-2.1.7.2 {
 641  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -0.00543
 642} {abc: (-5.4e-03) :xyz}
 643do_test printf-2.1.7.3 {
 644  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -0.00543
 645} {abc: (-0.005) :xyz}
 646do_test printf-2.1.7.4 {
 647  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -0.00543
 648} {abc: 1 1 (-0.00543) :xyz}
 649do_test printf-2.1.7.5 {
 650  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -0.00543
 651} {abc: 1 1 (-0.00543000) :xyz}
 652do_test printf-2.1.7.6 {
 653  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -0.00543
 654} {abc: 1 1 (-000.00543) :xyz}
 655do_test printf-2.1.7.7 {
 656  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -0.00543
 657} {abc: 1 1 (-0.0) :xyz}
 658do_test printf-2.1.7.8 {
 659  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -0.00543
 660} {abc: 1 1 (-5.4e-03) :xyz}
 661do_test printf-2.1.7.9 {
 662  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -0.00543
 663} {abc: 1 1 (-0.005) :xyz}
 664do_test printf-2.1.8.1 {
 665  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -1.0
 666} {abc: (-1.0) :xyz}
 667do_test printf-2.1.8.2 {
 668  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -1.0
 669} {abc: (-1.0e+00) :xyz}
 670do_test printf-2.1.8.3 {
 671  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -1.0
 672} {abc: (-1) :xyz}
 673do_test printf-2.1.8.4 {
 674  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -1.0
 675} {abc: 1 1 (-1) :xyz}
 676do_test printf-2.1.8.5 {
 677  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -1.0
 678} {abc: 1 1 (-1.00000) :xyz}
 679do_test printf-2.1.8.6 {
 680  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -1.0
 681} {abc: 1 1 (-000000001) :xyz}
 682do_test printf-2.1.8.7 {
 683  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -1.0
 684} {abc: 1 1 (-1.0) :xyz}
 685do_test printf-2.1.8.8 {
 686  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -1.0
 687} {abc: 1 1 (-1.0e+00) :xyz}
 688do_test printf-2.1.8.9 {
 689  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -1.0
 690} {abc: 1 1 (-1) :xyz}
 691do_test printf-2.1.9.1 {
 692  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -99.99999
 693} {abc: (-100.0) :xyz}
 694do_test printf-2.1.9.2 {
 695  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -99.99999
 696} {abc: (-1.0e+02) :xyz}
 697do_test printf-2.1.9.3 {
 698  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -99.99999
 699} {abc: (-1e+02) :xyz}
 700do_test printf-2.1.9.4 {
 701  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -99.99999
 702} {abc: 1 1 (-100) :xyz}
 703do_test printf-2.1.9.5 {
 704  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -99.99999
 705} {abc: 1 1 (-100.000) :xyz}
 706do_test printf-2.1.9.6 {
 707  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -99.99999
 708} {abc: 1 1 (-000000100) :xyz}
 709do_test printf-2.1.9.7 {
 710  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -99.99999
 711} {abc: 1 1 (-100.0) :xyz}
 712do_test printf-2.1.9.8 {
 713  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -99.99999
 714} {abc: 1 1 (-1.0e+02) :xyz}
 715do_test printf-2.1.9.9 {
 716  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -99.99999
 717} {abc: 1 1 (-1e+02) :xyz}
 718do_test printf-2.1.10.1 {
 719  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 3.14e+9
 720} {abc: (3140000000.0) :xyz}
 721do_test printf-2.1.10.2 {
 722  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 3.14e+9
 723} {abc: (3.1e+09) :xyz}
 724do_test printf-2.1.10.3 {
 725  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 3.14e+9
 726} {abc: (3e+09) :xyz}
 727do_test printf-2.1.10.4 {
 728  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 3.14e+9
 729} {abc: 1 1 (3.14e+09) :xyz}
 730do_test printf-2.1.10.5 {
 731  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 3.14e+9
 732} {abc: 1 1 (3.14000e+09) :xyz}
 733do_test printf-2.1.10.6 {
 734  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 3.14e+9
 735} {abc: 1 1 (003.14e+09) :xyz}
 736do_test printf-2.1.10.7 {
 737  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 3.14e+9
 738} {abc: 1 1 (3140000000.0) :xyz}
 739do_test printf-2.1.10.8 {
 740  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 3.14e+9
 741} {abc: 1 1 (3.1e+09) :xyz}
 742do_test printf-2.1.10.9 {
 743  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 3.14e+9
 744} {abc: 1 1 (3e+09) :xyz}
 745do_test printf-2.1.11.2 {
 746  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -4.72732e+88
 747} {abc: (-4.7e+88) :xyz}
 748do_test printf-2.1.11.3 {
 749  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -4.72732e+88
 750} {abc: (-5e+88) :xyz}
 751do_test printf-2.1.11.4 {
 752  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -4.72732e+88
 753} {abc: 1 1 (-4.72732e+88) :xyz}
 754do_test printf-2.1.11.5 {
 755  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -4.72732e+88
 756} {abc: 1 1 (-4.72732e+88) :xyz}
 757do_test printf-2.1.11.6 {
 758  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -4.72732e+88
 759} {abc: 1 1 (-4.72732e+88) :xyz}
 760do_test printf-2.1.11.8 {
 761  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -4.72732e+88
 762} {abc: 1 1 (-4.7e+88) :xyz}
 763do_test printf-2.1.11.9 {
 764  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -4.72732e+88
 765} {abc: 1 1 (-5e+88) :xyz}
 766do_test printf-2.1.12.2 {
 767  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 9.87991e+143
 768} {abc: (9.9e+143) :xyz}
 769do_test printf-2.1.12.3 {
 770  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 9.87991e+143
 771} {abc: (1e+144) :xyz}
 772do_test printf-2.1.12.4 {
 773  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 9.87991e+143
 774} {abc: 1 1 (9.87991e+143) :xyz}
 775do_test printf-2.1.12.5 {
 776  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 9.87991e+143
 777} {abc: 1 1 (9.87991e+143) :xyz}
 778do_test printf-2.1.12.6 {
 779  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 9.87991e+143
 780} {abc: 1 1 (9.87991e+143) :xyz}
 781do_test printf-2.1.12.8 {
 782  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 9.87991e+143
 783} {abc: 1 1 (9.9e+143) :xyz}
 784do_test printf-2.1.12.9 {
 785  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 9.87991e+143
 786} {abc: 1 1 (1e+144) :xyz}
 787do_test printf-2.1.13.1 {
 788  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 -6.287291e-9
 789} {abc: (-0.0) :xyz}
 790do_test printf-2.1.13.2 {
 791  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 -6.287291e-9
 792} {abc: (-6.3e-09) :xyz}
 793do_test printf-2.1.13.3 {
 794  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 -6.287291e-9
 795} {abc: (-6e-09) :xyz}
 796do_test printf-2.1.13.4 {
 797  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 -6.287291e-9
 798} {abc: 1 1 (-6.28729e-09) :xyz}
 799do_test printf-2.1.13.5 {
 800  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 -6.287291e-9
 801} {abc: 1 1 (-6.28729e-09) :xyz}
 802do_test printf-2.1.13.6 {
 803  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 -6.287291e-9
 804} {abc: 1 1 (-6.28729e-09) :xyz}
 805do_test printf-2.1.13.7 {
 806  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 -6.287291e-9
 807} {abc: 1 1 (-0.0) :xyz}
 808do_test printf-2.1.13.8 {
 809  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 -6.287291e-9
 810} {abc: 1 1 (-6.3e-09) :xyz}
 811do_test printf-2.1.13.9 {
 812  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 -6.287291e-9
 813} {abc: 1 1 (-6e-09) :xyz}
 814do_test printf-2.1.14.1 {
 815  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 3.38826392e-110
 816} {abc: (0.0) :xyz}
 817do_test printf-2.1.14.2 {
 818  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 3.38826392e-110
 819} {abc: (3.4e-110) :xyz}
 820do_test printf-2.1.14.3 {
 821  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 1 1 3.38826392e-110
 822} {abc: (3e-110) :xyz}
 823do_test printf-2.1.14.4 {
 824  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 1 1 3.38826392e-110
 825} {abc: 1 1 (3.38826e-110) :xyz}
 826do_test printf-2.1.14.5 {
 827  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 1 1 3.38826392e-110
 828} {abc: 1 1 (3.38826e-110) :xyz}
 829do_test printf-2.1.14.6 {
 830  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 1 1 3.38826392e-110
 831} {abc: 1 1 (3.38826e-110) :xyz}
 832do_test printf-2.1.14.7 {
 833  sqlite3_mprintf_double {abc: %d %d (%1.1f) :xyz} 1 1 3.38826392e-110
 834} {abc: 1 1 (0.0) :xyz}
 835do_test printf-2.1.14.8 {
 836  sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 3.38826392e-110
 837} {abc: 1 1 (3.4e-110) :xyz}
 838do_test printf-2.1.14.9 {
 839  sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 3.38826392e-110
 840} {abc: 1 1 (3e-110) :xyz}
 841do_test printf-2.2.1.1 {
 842  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 0.001
 843} {abc: (0.00100) :xyz}
 844do_test printf-2.2.1.2 {
 845  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 0.001
 846} {abc: (1.00000e-03) :xyz}
 847do_test printf-2.2.1.3 {
 848  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 0.001
 849} {abc: (0.001) :xyz}
 850do_test printf-2.2.1.4 {
 851  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 0.001
 852} {abc: 5 5 (0.001) :xyz}
 853do_test printf-2.2.1.5 {
 854  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 0.001
 855} {abc: 5 5 (0.00100000) :xyz}
 856do_test printf-2.2.1.6 {
 857  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 0.001
 858} {abc: 5 5 (000000.001) :xyz}
 859do_test printf-2.2.1.7 {
 860  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 0.001
 861} {abc: 5 5 (0.00100) :xyz}
 862do_test printf-2.2.1.8 {
 863  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 0.001
 864} {abc: 5 5 (1.00000e-03) :xyz}
 865do_test printf-2.2.1.9 {
 866  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 0.001
 867} {abc: 5 5 (0.001) :xyz}
 868do_test printf-2.2.2.1 {
 869  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 1.0e-20
 870} {abc: (0.00000) :xyz}
 871do_test printf-2.2.2.2 {
 872  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 1.0e-20
 873} {abc: (1.00000e-20) :xyz}
 874do_test printf-2.2.2.3 {
 875  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 1.0e-20
 876} {abc: (1e-20) :xyz}
 877do_test printf-2.2.2.4 {
 878  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 1.0e-20
 879} {abc: 5 5 (1e-20) :xyz}
 880do_test printf-2.2.2.5 {
 881  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 1.0e-20
 882} {abc: 5 5 (1.00000e-20) :xyz}
 883do_test printf-2.2.2.6 {
 884  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 1.0e-20
 885} {abc: 5 5 (000001e-20) :xyz}
 886do_test printf-2.2.2.7 {
 887  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 1.0e-20
 888} {abc: 5 5 (0.00000) :xyz}
 889do_test printf-2.2.2.8 {
 890  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 1.0e-20
 891} {abc: 5 5 (1.00000e-20) :xyz}
 892do_test printf-2.2.2.9 {
 893  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 1.0e-20
 894} {abc: 5 5 (1e-20) :xyz}
 895do_test printf-2.2.3.1 {
 896  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 1.0
 897} {abc: (1.00000) :xyz}
 898do_test printf-2.2.3.2 {
 899  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 1.0
 900} {abc: (1.00000e+00) :xyz}
 901do_test printf-2.2.3.3 {
 902  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 1.0
 903} {abc: (    1) :xyz}
 904do_test printf-2.2.3.4 {
 905  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 1.0
 906} {abc: 5 5 (1) :xyz}
 907do_test printf-2.2.3.5 {
 908  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 1.0
 909} {abc: 5 5 (1.00000) :xyz}
 910do_test printf-2.2.3.6 {
 911  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 1.0
 912} {abc: 5 5 (0000000001) :xyz}
 913do_test printf-2.2.3.7 {
 914  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 1.0
 915} {abc: 5 5 (1.00000) :xyz}
 916do_test printf-2.2.3.8 {
 917  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 1.0
 918} {abc: 5 5 (1.00000e+00) :xyz}
 919do_test printf-2.2.3.9 {
 920  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 1.0
 921} {abc: 5 5 (    1) :xyz}
 922do_test printf-2.2.4.1 {
 923  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 0.0
 924} {abc: (0.00000) :xyz}
 925do_test printf-2.2.4.2 {
 926  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 0.0
 927} {abc: (0.00000e+00) :xyz}
 928do_test printf-2.2.4.3 {
 929  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 0.0
 930} {abc: (    0) :xyz}
 931do_test printf-2.2.4.4 {
 932  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 0.0
 933} {abc: 5 5 (0) :xyz}
 934do_test printf-2.2.4.5 {
 935  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 0.0
 936} {abc: 5 5 (0.00000) :xyz}
 937do_test printf-2.2.4.6 {
 938  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 0.0
 939} {abc: 5 5 (0000000000) :xyz}
 940do_test printf-2.2.4.7 {
 941  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 0.0
 942} {abc: 5 5 (0.00000) :xyz}
 943do_test printf-2.2.4.8 {
 944  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 0.0
 945} {abc: 5 5 (0.00000e+00) :xyz}
 946do_test printf-2.2.4.9 {
 947  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 0.0
 948} {abc: 5 5 (    0) :xyz}
 949do_test printf-2.2.5.1 {
 950  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 100.0
 951} {abc: (100.00000) :xyz}
 952do_test printf-2.2.5.2 {
 953  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 100.0
 954} {abc: (1.00000e+02) :xyz}
 955do_test printf-2.2.5.3 {
 956  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 100.0
 957} {abc: (  100) :xyz}
 958do_test printf-2.2.5.4 {
 959  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 100.0
 960} {abc: 5 5 (100) :xyz}
 961do_test printf-2.2.5.5 {
 962  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 100.0
 963} {abc: 5 5 (100.000) :xyz}
 964do_test printf-2.2.5.6 {
 965  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 100.0
 966} {abc: 5 5 (0000000100) :xyz}
 967do_test printf-2.2.5.7 {
 968  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 100.0
 969} {abc: 5 5 (100.00000) :xyz}
 970do_test printf-2.2.5.8 {
 971  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 100.0
 972} {abc: 5 5 (1.00000e+02) :xyz}
 973do_test printf-2.2.5.9 {
 974  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 100.0
 975} {abc: 5 5 (  100) :xyz}
 976do_test printf-2.2.6.1 {
 977  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 9.99999
 978} {abc: (9.99999) :xyz}
 979do_test printf-2.2.6.2 {
 980  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 9.99999
 981} {abc: (9.99999e+00) :xyz}
 982do_test printf-2.2.6.3 {
 983  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 9.99999
 984} {abc: (   10) :xyz}
 985do_test printf-2.2.6.4 {
 986  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 9.99999
 987} {abc: 5 5 (9.99999) :xyz}
 988do_test printf-2.2.6.5 {
 989  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 9.99999
 990} {abc: 5 5 (9.99999) :xyz}
 991do_test printf-2.2.6.6 {
 992  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 9.99999
 993} {abc: 5 5 (0009.99999) :xyz}
 994do_test printf-2.2.6.7 {
 995  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 9.99999
 996} {abc: 5 5 (9.99999) :xyz}
 997do_test printf-2.2.6.8 {
 998  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 9.99999
 999} {abc: 5 5 (9.99999e+00) :xyz}
1000do_test printf-2.2.6.9 {
1001  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 9.99999
1002} {abc: 5 5 (   10) :xyz}
1003do_test printf-2.2.7.1 {
1004  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -0.00543
1005} {abc: (-0.00543) :xyz}
1006do_test printf-2.2.7.2 {
1007  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -0.00543
1008} {abc: (-5.43000e-03) :xyz}
1009do_test printf-2.2.7.3 {
1010  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -0.00543
1011} {abc: (-0.00543) :xyz}
1012do_test printf-2.2.7.4 {
1013  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -0.00543
1014} {abc: 5 5 (-0.00543) :xyz}
1015do_test printf-2.2.7.5 {
1016  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -0.00543
1017} {abc: 5 5 (-0.00543000) :xyz}
1018do_test printf-2.2.7.6 {
1019  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -0.00543
1020} {abc: 5 5 (-000.00543) :xyz}
1021do_test printf-2.2.7.7 {
1022  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -0.00543
1023} {abc: 5 5 (-0.00543) :xyz}
1024do_test printf-2.2.7.8 {
1025  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -0.00543
1026} {abc: 5 5 (-5.43000e-03) :xyz}
1027do_test printf-2.2.7.9 {
1028  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -0.00543
1029} {abc: 5 5 (-0.00543) :xyz}
1030do_test printf-2.2.8.1 {
1031  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -1.0
1032} {abc: (-1.00000) :xyz}
1033do_test printf-2.2.8.2 {
1034  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -1.0
1035} {abc: (-1.00000e+00) :xyz}
1036do_test printf-2.2.8.3 {
1037  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -1.0
1038} {abc: (   -1) :xyz}
1039do_test printf-2.2.8.4 {
1040  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -1.0
1041} {abc: 5 5 (-1) :xyz}
1042do_test printf-2.2.8.5 {
1043  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -1.0
1044} {abc: 5 5 (-1.00000) :xyz}
1045do_test printf-2.2.8.6 {
1046  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -1.0
1047} {abc: 5 5 (-000000001) :xyz}
1048do_test printf-2.2.8.7 {
1049  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -1.0
1050} {abc: 5 5 (-1.00000) :xyz}
1051do_test printf-2.2.8.8 {
1052  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -1.0
1053} {abc: 5 5 (-1.00000e+00) :xyz}
1054do_test printf-2.2.8.9 {
1055  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -1.0
1056} {abc: 5 5 (   -1) :xyz}
1057do_test printf-2.2.9.1 {
1058  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -99.99999
1059} {abc: (-99.99999) :xyz}
1060do_test printf-2.2.9.2 {
1061  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -99.99999
1062} {abc: (-1.00000e+02) :xyz}
1063do_test printf-2.2.9.3 {
1064  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -99.99999
1065} {abc: ( -100) :xyz}
1066do_test printf-2.2.9.4 {
1067  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -99.99999
1068} {abc: 5 5 (-100) :xyz}
1069do_test printf-2.2.9.5 {
1070  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -99.99999
1071} {abc: 5 5 (-100.000) :xyz}
1072do_test printf-2.2.9.6 {
1073  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -99.99999
1074} {abc: 5 5 (-000000100) :xyz}
1075do_test printf-2.2.9.7 {
1076  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -99.99999
1077} {abc: 5 5 (-99.99999) :xyz}
1078do_test printf-2.2.9.8 {
1079  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -99.99999
1080} {abc: 5 5 (-1.00000e+02) :xyz}
1081do_test printf-2.2.9.9 {
1082  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -99.99999
1083} {abc: 5 5 ( -100) :xyz}
1084do_test printf-2.2.10.1 {
1085  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 3.14e+9
1086} {abc: (3140000000.00000) :xyz}
1087do_test printf-2.2.10.2 {
1088  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 3.14e+9
1089} {abc: (3.14000e+09) :xyz}
1090do_test printf-2.2.10.3 {
1091  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 3.14e+9
1092} {abc: (3.14e+09) :xyz}
1093do_test printf-2.2.10.4 {
1094  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 3.14e+9
1095} {abc: 5 5 (3.14e+09) :xyz}
1096do_test printf-2.2.10.5 {
1097  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 3.14e+9
1098} {abc: 5 5 (3.14000e+09) :xyz}
1099do_test printf-2.2.10.6 {
1100  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 3.14e+9
1101} {abc: 5 5 (003.14e+09) :xyz}
1102do_test printf-2.2.10.7 {
1103  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 3.14e+9
1104} {abc: 5 5 (3140000000.00000) :xyz}
1105do_test printf-2.2.10.8 {
1106  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 3.14e+9
1107} {abc: 5 5 (3.14000e+09) :xyz}
1108do_test printf-2.2.10.9 {
1109  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 3.14e+9
1110} {abc: 5 5 (3.14e+09) :xyz}
1111do_test printf-2.2.11.2 {
1112  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -4.72732e+88
1113} {abc: (-4.72732e+88) :xyz}
1114do_test printf-2.2.11.3 {
1115  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -4.72732e+88
1116} {abc: (-4.7273e+88) :xyz}
1117do_test printf-2.2.11.4 {
1118  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -4.72732e+88
1119} {abc: 5 5 (-4.72732e+88) :xyz}
1120do_test printf-2.2.11.5 {
1121  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -4.72732e+88
1122} {abc: 5 5 (-4.72732e+88) :xyz}
1123do_test printf-2.2.11.6 {
1124  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -4.72732e+88
1125} {abc: 5 5 (-4.72732e+88) :xyz}
1126do_test printf-2.2.11.8 {
1127  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -4.72732e+88
1128} {abc: 5 5 (-4.72732e+88) :xyz}
1129do_test printf-2.2.11.9 {
1130  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -4.72732e+88
1131} {abc: 5 5 (-4.7273e+88) :xyz}
1132do_test printf-2.2.12.2 {
1133  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 9.87991e+143
1134} {abc: (9.87991e+143) :xyz}
1135do_test printf-2.2.12.3 {
1136  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 9.87991e+143
1137} {abc: (9.8799e+143) :xyz}
1138do_test printf-2.2.12.4 {
1139  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 9.87991e+143
1140} {abc: 5 5 (9.87991e+143) :xyz}
1141do_test printf-2.2.12.5 {
1142  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 9.87991e+143
1143} {abc: 5 5 (9.87991e+143) :xyz}
1144do_test printf-2.2.12.6 {
1145  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 9.87991e+143
1146} {abc: 5 5 (9.87991e+143) :xyz}
1147do_test printf-2.2.12.8 {
1148  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 9.87991e+143
1149} {abc: 5 5 (9.87991e+143) :xyz}
1150do_test printf-2.2.12.9 {
1151  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 9.87991e+143
1152} {abc: 5 5 (9.8799e+143) :xyz}
1153do_test printf-2.2.13.1 {
1154  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 -6.287291e-9
1155} {abc: (-0.00000) :xyz}
1156do_test printf-2.2.13.2 {
1157  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 -6.287291e-9
1158} {abc: (-6.28729e-09) :xyz}
1159do_test printf-2.2.13.3 {
1160  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 -6.287291e-9
1161} {abc: (-6.2873e-09) :xyz}
1162do_test printf-2.2.13.4 {
1163  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 -6.287291e-9
1164} {abc: 5 5 (-6.28729e-09) :xyz}
1165do_test printf-2.2.13.5 {
1166  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 -6.287291e-9
1167} {abc: 5 5 (-6.28729e-09) :xyz}
1168do_test printf-2.2.13.6 {
1169  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 -6.287291e-9
1170} {abc: 5 5 (-6.28729e-09) :xyz}
1171do_test printf-2.2.13.7 {
1172  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 -6.287291e-9
1173} {abc: 5 5 (-0.00000) :xyz}
1174do_test printf-2.2.13.8 {
1175  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 -6.287291e-9
1176} {abc: 5 5 (-6.28729e-09) :xyz}
1177do_test printf-2.2.13.9 {
1178  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 -6.287291e-9
1179} {abc: 5 5 (-6.2873e-09) :xyz}
1180do_test printf-2.2.14.1 {
1181  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 5 5 3.38826392e-110
1182} {abc: (0.00000) :xyz}
1183do_test printf-2.2.14.2 {
1184  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 5 5 3.38826392e-110
1185} {abc: (3.38826e-110) :xyz}
1186do_test printf-2.2.14.3 {
1187  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 5 5 3.38826392e-110
1188} {abc: (3.3883e-110) :xyz}
1189do_test printf-2.2.14.4 {
1190  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 5 5 3.38826392e-110
1191} {abc: 5 5 (3.38826e-110) :xyz}
1192do_test printf-2.2.14.5 {
1193  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 5 5 3.38826392e-110
1194} {abc: 5 5 (3.38826e-110) :xyz}
1195do_test printf-2.2.14.6 {
1196  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 5 5 3.38826392e-110
1197} {abc: 5 5 (3.38826e-110) :xyz}
1198do_test printf-2.2.14.7 {
1199  sqlite3_mprintf_double {abc: %d %d (%5.5f) :xyz} 5 5 3.38826392e-110
1200} {abc: 5 5 (0.00000) :xyz}
1201do_test printf-2.2.14.8 {
1202  sqlite3_mprintf_double {abc: %d %d (%5.5e) :xyz} 5 5 3.38826392e-110
1203} {abc: 5 5 (3.38826e-110) :xyz}
1204do_test printf-2.2.14.9 {
1205  sqlite3_mprintf_double {abc: %d %d (%5.5g) :xyz} 5 5 3.38826392e-110
1206} {abc: 5 5 (3.3883e-110) :xyz}
1207do_test printf-2.3.1.1 {
1208  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 0.001
1209} {abc: (0.0010000000) :xyz}
1210do_test printf-2.3.1.2 {
1211  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 0.001
1212} {abc: (1.0000000000e-03) :xyz}
1213do_test printf-2.3.1.3 {
1214  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 0.001
1215} {abc: (     0.001) :xyz}
1216do_test printf-2.3.1.4 {
1217  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 0.001
1218} {abc: 10 10 (0.001) :xyz}
1219do_test printf-2.3.1.5 {
1220  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 0.001
1221} {abc: 10 10 (0.00100000) :xyz}
1222do_test printf-2.3.1.6 {
1223  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 0.001
1224} {abc: 10 10 (000000.001) :xyz}
1225do_test printf-2.3.1.7 {
1226  sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 0.001
1227} {abc: 10 10 (0.0010000000) :xyz}
1228do_test printf-2.3.1.8 {
1229  sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 0.001
1230} {abc: 10 10 (1.0000000000e-03) :xyz}
1231do_test printf-2.3.1.9 {
1232  sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 0.001
1233} {abc: 10 10 (     0.001) :xyz}
1234do_test printf-2.3.2.1 {
1235  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 1.0e-20
1236} {abc: (0.0000000000) :xyz}
1237do_test printf-2.3.2.2 {
1238  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 1.0e-20
1239} {abc: (1.0000000000e-20) :xyz}
1240do_test printf-2.3.2.3 {
1241  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 1.0e-20
1242} {abc: (     1e-20) :xyz}
1243do_test printf-2.3.2.4 {
1244  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 1.0e-20
1245} {abc: 10 10 (1e-20) :xyz}
1246do_test printf-2.3.2.5 {
1247  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 1.0e-20
1248} {abc: 10 10 (1.00000e-20) :xyz}
1249do_test printf-2.3.2.6 {
1250  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 1.0e-20
1251} {abc: 10 10 (000001e-20) :xyz}
1252do_test printf-2.3.2.7 {
1253  sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 1.0e-20
1254} {abc: 10 10 (0.0000000000) :xyz}
1255do_test printf-2.3.2.8 {
1256  sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 1.0e-20
1257} {abc: 10 10 (1.0000000000e-20) :xyz}
1258do_test printf-2.3.2.9 {
1259  sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 1.0e-20
1260} {abc: 10 10 (     1e-20) :xyz}
1261do_test printf-2.3.3.1 {
1262  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 1.0
1263} {abc: (1.0000000000) :xyz}
1264do_test printf-2.3.3.2 {
1265  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 1.0
1266} {abc: (1.0000000000e+00) :xyz}
1267do_test printf-2.3.3.3 {
1268  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 1.0
1269} {abc: (         1) :xyz}
1270do_test printf-2.3.3.4 {
1271  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 1.0
1272} {abc: 10 10 (1) :xyz}
1273do_test printf-2.3.3.5 {
1274  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 1.0
1275} {abc: 10 10 (1.00000) :xyz}
1276do_test printf-2.3.3.6 {
1277  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 1.0
1278} {abc: 10 10 (0000000001) :xyz}
1279do_test printf-2.3.3.7 {
1280  sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 1.0
1281} {abc: 10 10 (1.0000000000) :xyz}
1282do_test printf-2.3.3.8 {
1283  sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 1.0
1284} {abc: 10 10 (1.0000000000e+00) :xyz}
1285do_test printf-2.3.3.9 {
1286  sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 1.0
1287} {abc: 10 10 (         1) :xyz}
1288do_test printf-2.3.4.1 {
1289  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 0.0
1290} {abc: (0.0000000000) :xyz}
1291do_test printf-2.3.4.2 {
1292  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 0.0
1293} {abc: (0.0000000000e+00) :xyz}
1294do_test printf-2.3.4.3 {
1295  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 0.0
1296} {abc: (         0) :xyz}
1297do_test printf-2.3.4.4 {
1298  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 0.0
1299} {abc: 10 10 (0) :xyz}
1300do_test printf-2.3.4.5 {
1301  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 0.0
1302} {abc: 10 10 (0.00000) :xyz}
1303do_test printf-2.3.4.6 {
1304  sqlite3_mprintf_double {abc: %d %d (%010g) :xyz} 10 10 0.0
1305} {abc: 10 10 (0000000000) :xyz}
1306do_test printf-2.3.4.7 {
1307  sqlite3_mprintf_double {abc: %d %d (%10.10f) :xyz} 10 10 0.0
1308} {abc: 10 10 (0.0000000000) :xyz}
1309do_test printf-2.3.4.8 {
1310  sqlite3_mprintf_double {abc: %d %d (%10.10e) :xyz} 10 10 0.0
1311} {abc: 10 10 (0.0000000000e+00) :xyz}
1312do_test printf-2.3.4.9 {
1313  sqlite3_mprintf_double {abc: %d %d (%10.10g) :xyz} 10 10 0.0
1314} {abc: 10 10 (         0) :xyz}
1315do_test printf-2.3.5.1 {
1316  sqlite3_mprintf_double {abc: (%*.*f) :xyz} 10 10 100.0
1317} {abc: (100.0000000000) :xyz}
1318do_test printf-2.3.5.2 {
1319  sqlite3_mprintf_double {abc: (%*.*e) :xyz} 10 10 100.0
1320} {abc: (1.0000000000e+02) :xyz}
1321do_test printf-2.3.5.3 {
1322  sqlite3_mprintf_double {abc: (%*.*g) :xyz} 10 10 100.0
1323} {abc: (       100) :xyz}
1324do_test printf-2.3.5.4 {
1325  sqlite3_mprintf_double {abc: %d %d (%g) :xyz} 10 10 100.0
1326} {abc: 10 10 (100) :xyz}
1327do_test printf-2.3.5.5 {
1328  sqlite3_mprintf_double {abc: %d %d (%#g) :xyz} 10 10 100.0
1329} {ab…

Large files files are truncated, but you can click here to view the full file