/ Check-in [1586244b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Changes to various test scripts so that they pass on windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win32-test-fixes
Files: files | file ages | folders
SHA1: 1586244b6d86d5a98af8c6f7a8324672e02df9c3
User & Date: dan 2011-05-05 19:44:22
Context
2011-05-06
13:58
Merge windows test case fixes. No changes to code. check-in: 2e5c0ed7 user: dan tags: trunk
2011-05-05
19:44
Changes to various test scripts so that they pass on windows. Closed-Leaf check-in: 1586244b user: dan tags: win32-test-fixes
17:41
Fix sqlite3_vtab_on_conflict() to return the correct values for ABORT, FAIL, and IGNORE. check-in: f0617d61 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/alter.test.

   646    646       SELECT $::col_name, $::col_name2 FROM $::tbl_name;
   647    647     "
   648    648   } {4 5}
   649    649   
   650    650   # Ticket #1665:  Make sure ALTER TABLE ADD COLUMN works on a table
   651    651   # that includes a COLLATE clause.
   652    652   #
   653         -do_test alter-7.1 {
          653  +do_realnum_test alter-7.1 {
   654    654     execsql {
   655    655       CREATE TABLE t1(a TEXT COLLATE BINARY);
   656    656       ALTER TABLE t1 ADD COLUMN b INTEGER COLLATE NOCASE;
   657    657       INSERT INTO t1 VALUES(1,'-2');
   658    658       INSERT INTO t1 VALUES(5.4e-08,'5.4e-08');
   659    659       SELECT typeof(a), a, typeof(b), b FROM t1;
   660    660     }

Changes to test/cast.test.

   230    230   #
   231    231   do_test cast-3.1 {
   232    232     execsql {SELECT CAST(9223372036854774800 AS integer)}
   233    233   } 9223372036854774800
   234    234   do_test cast-3.2 {
   235    235     execsql {SELECT CAST(9223372036854774800 AS numeric)}
   236    236   } 9223372036854774800
   237         -do_test cast-3.3 {
          237  +do_realnum_test cast-3.3 {
   238    238     execsql {SELECT CAST(9223372036854774800 AS real)}
   239    239   } 9.22337203685477e+18
   240    240   do_test cast-3.4 {
   241    241     execsql {SELECT CAST(CAST(9223372036854774800 AS real) AS integer)}
   242    242   } 9223372036854774784
   243    243   do_test cast-3.5 {
   244    244     execsql {SELECT CAST(-9223372036854774800 AS integer)}
   245    245   } -9223372036854774800
   246    246   do_test cast-3.6 {
   247    247     execsql {SELECT CAST(-9223372036854774800 AS numeric)}
   248    248   } -9223372036854774800
   249         -do_test cast-3.7 {
          249  +do_realnum_test cast-3.7 {
   250    250     execsql {SELECT CAST(-9223372036854774800 AS real)}
   251    251   } -9.22337203685477e+18
   252    252   do_test cast-3.8 {
   253    253     execsql {SELECT CAST(CAST(-9223372036854774800 AS real) AS integer)}
   254    254   } -9223372036854774784
   255    255   do_test cast-3.11 {
   256    256     execsql {SELECT CAST('9223372036854774800' AS integer)}
   257    257   } 9223372036854774800
   258    258   do_test cast-3.12 {
   259    259     execsql {SELECT CAST('9223372036854774800' AS numeric)}
   260    260   } 9223372036854774800
   261         -do_test cast-3.13 {
          261  +do_realnum_test cast-3.13 {
   262    262     execsql {SELECT CAST('9223372036854774800' AS real)}
   263    263   } 9.22337203685477e+18
   264    264   ifcapable long_double {
   265    265     do_test cast-3.14 {
   266    266       execsql {SELECT CAST(CAST('9223372036854774800' AS real) AS integer)}
   267    267     } 9223372036854774784
   268    268   }
   269    269   do_test cast-3.15 {
   270    270     execsql {SELECT CAST('-9223372036854774800' AS integer)}
   271    271   } -9223372036854774800
   272    272   do_test cast-3.16 {
   273    273     execsql {SELECT CAST('-9223372036854774800' AS numeric)}
   274    274   } -9223372036854774800
   275         -do_test cast-3.17 {
          275  +do_realnum_test cast-3.17 {
   276    276     execsql {SELECT CAST('-9223372036854774800' AS real)}
   277    277   } -9.22337203685477e+18
   278    278   ifcapable long_double {
   279    279     do_test cast-3.18 {
   280    280       execsql {SELECT CAST(CAST('-9223372036854774800' AS real) AS integer)}
   281    281     } -9223372036854774784
   282    282   }
................................................................................
   283    283   if {[db eval {PRAGMA encoding}]=="UTF-8"} {
   284    284     do_test cast-3.21 {
   285    285       execsql {SELECT CAST(x'39323233333732303336383534373734383030' AS integer)}
   286    286     } 9223372036854774800
   287    287     do_test cast-3.22 {
   288    288       execsql {SELECT CAST(x'39323233333732303336383534373734383030' AS numeric)}
   289    289     } 9223372036854774800
   290         -  do_test cast-3.23 {
          290  +  do_realnum_test cast-3.23 {
   291    291       execsql {SELECT CAST(x'39323233333732303336383534373734383030' AS real)}
   292    292     } 9.22337203685477e+18
   293    293     ifcapable long_double {
   294    294       do_test cast-3.24 {
   295    295         execsql {
   296    296           SELECT CAST(CAST(x'39323233333732303336383534373734383030' AS real)
   297    297                       AS integer)

Changes to test/expr.test.

    28     28   }
    29     29   
    30     30   proc test_expr {name settings expr result} {
    31     31     do_test $name [format {
    32     32       execsql {BEGIN; UPDATE test1 SET %s; SELECT %s FROM test1; ROLLBACK;}
    33     33     } $settings $expr] $result
    34     34   }
           35  +proc test_realnum_expr {name settings expr result} {
           36  +  do_realnum_test $name [format {
           37  +    execsql {BEGIN; UPDATE test1 SET %s; SELECT %s FROM test1; ROLLBACK;}
           38  +  } $settings $expr] $result
           39  +}
    35     40   
    36     41   test_expr expr-1.1 {i1=10, i2=20} {i1+i2} 30
    37     42   test_expr expr-1.2 {i1=10, i2=20} {i1-i2} -10
    38     43   test_expr expr-1.3 {i1=10, i2=20} {i1*i2} 200
    39     44   test_expr expr-1.4 {i1=10, i2=20} {i1/i2} 0
    40     45   test_expr expr-1.5 {i1=10, i2=20} {i2/i1} 2
    41     46   test_expr expr-1.6 {i1=10, i2=20} {i2<i1} 0
................................................................................
   160    165   ifcapable floatingpoint {
   161    166     test_expr expr-1.103 {i1=0} {(-2147483648.0 % -1)} 0.0
   162    167     test_expr expr-1.104 {i1=0} {(-9223372036854775808.0 % -1)} 0.0
   163    168     test_expr expr-1.105 {i1=0} {(-9223372036854775808.0 / -1)>1} 1
   164    169   }
   165    170   
   166    171   if {[working_64bit_int]} {
   167         -  test_expr expr-1.106 {i1=0} {-9223372036854775808/-1} 9.22337203685478e+18
          172  +  test_realnum_expr expr-1.106 {i1=0} {-9223372036854775808/-1} 9.22337203685478e+18
   168    173   }
   169    174   
   170    175   test_expr expr-1.107 {i1=0} {-9223372036854775808%-1} 0
   171    176   test_expr expr-1.108 {i1=0} {1%0} {{}}
   172    177   test_expr expr-1.109 {i1=0} {1/0} {{}}
   173    178   
   174    179   if {[working_64bit_int]} {
................................................................................
   199    204     {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} yes
   200    205   test_expr expr-1.126 {i1=8, i2=8} \
   201    206     {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} no
   202    207   
   203    208   ifcapable floatingpoint {if {[working_64bit_int]} {
   204    209     test_expr expr-1.200\
   205    210         {i1=9223372036854775806, i2=1} {i1+i2}      9223372036854775807
   206         -  test_expr expr-1.201\
          211  +  test_realnum_expr expr-1.201\
   207    212         {i1=9223372036854775806, i2=2} {i1+i2}      9.22337203685478e+18
   208         -  test_expr expr-1.202\
          213  +  test_realnum_expr expr-1.202\
   209    214         {i1=9223372036854775806, i2=100000} {i1+i2} 9.22337203685488e+18
   210         -  test_expr expr-1.203\
          215  +  test_realnum_expr expr-1.203\
   211    216         {i1=9223372036854775807, i2=0} {i1+i2}      9223372036854775807
   212         -  test_expr expr-1.204\
          217  +  test_realnum_expr expr-1.204\
   213    218         {i1=9223372036854775807, i2=1} {i1+i2}      9.22337203685478e+18
   214         -  test_expr expr-1.205\
          219  +  test_realnum_expr expr-1.205\
   215    220         {i2=9223372036854775806, i1=1} {i1+i2}      9223372036854775807
   216         -  test_expr expr-1.206\
          221  +  test_realnum_expr expr-1.206\
   217    222         {i2=9223372036854775806, i1=2} {i1+i2}      9.22337203685478e+18
   218         -  test_expr expr-1.207\
          223  +  test_realnum_expr expr-1.207\
   219    224         {i2=9223372036854775806, i1=100000} {i1+i2} 9.22337203685488e+18
   220         -  test_expr expr-1.208\
          225  +  test_realnum_expr expr-1.208\
   221    226         {i2=9223372036854775807, i1=0} {i1+i2}      9223372036854775807
   222         -  test_expr expr-1.209\
          227  +  test_realnum_expr expr-1.209\
   223    228         {i2=9223372036854775807, i1=1} {i1+i2}      9.22337203685478e+18
   224         -  test_expr expr-1.210\
          229  +  test_realnum_expr expr-1.210\
   225    230         {i1=-9223372036854775807, i2=-1} {i1+i2}    -9223372036854775808
   226         -  test_expr expr-1.211\
          231  +  test_realnum_expr expr-1.211\
   227    232         {i1=-9223372036854775807, i2=-2} {i1+i2}    -9.22337203685478e+18
   228         -  test_expr expr-1.212\
          233  +  test_realnum_expr expr-1.212\
   229    234         {i1=-9223372036854775807, i2=-100000} {i1+i2} -9.22337203685488e+18
   230         -  test_expr expr-1.213\
          235  +  test_realnum_expr expr-1.213\
   231    236         {i1=-9223372036854775808, i2=0} {i1+i2}     -9223372036854775808
   232         -  test_expr expr-1.214\
          237  +  test_realnum_expr expr-1.214\
   233    238         {i1=-9223372036854775808, i2=-1} {i1+i2}    -9.22337203685478e+18
   234         -  test_expr expr-1.215\
          239  +  test_realnum_expr expr-1.215\
   235    240         {i2=-9223372036854775807, i1=-1} {i1+i2}    -9223372036854775808
   236         -  test_expr expr-1.216\
          241  +  test_realnum_expr expr-1.216\
   237    242         {i2=-9223372036854775807, i1=-2} {i1+i2}    -9.22337203685478e+18
   238         -  test_expr expr-1.217\
          243  +  test_realnum_expr expr-1.217\
   239    244         {i2=-9223372036854775807, i1=-100000} {i1+i2} -9.22337203685488e+18
   240         -  test_expr expr-1.218\
          245  +  test_realnum_expr expr-1.218\
   241    246         {i2=-9223372036854775808, i1=0} {i1+i2}     -9223372036854775808
   242         -  test_expr expr-1.219\
          247  +  test_realnum_expr expr-1.219\
   243    248         {i2=-9223372036854775808, i1=-1} {i1+i2}    -9.22337203685478e+18
   244         -  test_expr expr-1.220\
          249  +  test_realnum_expr expr-1.220\
   245    250         {i1=9223372036854775806, i2=-1} {i1-i2}     9223372036854775807
   246         -  test_expr expr-1.221\
          251  +  test_realnum_expr expr-1.221\
   247    252         {i1=9223372036854775806, i2=-2} {i1-i2}      9.22337203685478e+18
   248         -  test_expr expr-1.222\
          253  +  test_realnum_expr expr-1.222\
   249    254         {i1=9223372036854775806, i2=-100000} {i1-i2} 9.22337203685488e+18
   250         -  test_expr expr-1.223\
          255  +  test_realnum_expr expr-1.223\
   251    256         {i1=9223372036854775807, i2=0} {i1-i2}      9223372036854775807
   252         -  test_expr expr-1.224\
          257  +  test_realnum_expr expr-1.224\
   253    258         {i1=9223372036854775807, i2=-1} {i1-i2}      9.22337203685478e+18
   254         -  test_expr expr-1.225\
          259  +  test_realnum_expr expr-1.225\
   255    260         {i2=-9223372036854775806, i1=1} {i1-i2}      9223372036854775807
   256         -  test_expr expr-1.226\
          261  +  test_realnum_expr expr-1.226\
   257    262         {i2=-9223372036854775806, i1=2} {i1-i2}      9.22337203685478e+18
   258         -  test_expr expr-1.227\
          263  +  test_realnum_expr expr-1.227\
   259    264         {i2=-9223372036854775806, i1=100000} {i1-i2} 9.22337203685488e+18
   260         -  test_expr expr-1.228\
          265  +  test_realnum_expr expr-1.228\
   261    266         {i2=-9223372036854775807, i1=0} {i1-i2}      9223372036854775807
   262         -  test_expr expr-1.229\
          267  +  test_realnum_expr expr-1.229\
   263    268         {i2=-9223372036854775807, i1=1} {i1-i2}      9.22337203685478e+18
   264         -  test_expr expr-1.230\
          269  +  test_realnum_expr expr-1.230\
   265    270         {i1=-9223372036854775807, i2=1} {i1-i2}    -9223372036854775808
   266         -  test_expr expr-1.231\
          271  +  test_realnum_expr expr-1.231\
   267    272         {i1=-9223372036854775807, i2=2} {i1-i2}    -9.22337203685478e+18
   268         -  test_expr expr-1.232\
          273  +  test_realnum_expr expr-1.232\
   269    274         {i1=-9223372036854775807, i2=100000} {i1-i2} -9.22337203685488e+18
   270         -  test_expr expr-1.233\
          275  +  test_realnum_expr expr-1.233\
   271    276         {i1=-9223372036854775808, i2=0} {i1-i2}     -9223372036854775808
   272         -  test_expr expr-1.234\
          277  +  test_realnum_expr expr-1.234\
   273    278         {i1=-9223372036854775808, i2=1} {i1-i2}    -9.22337203685478e+18
   274         -  test_expr expr-1.235\
          279  +  test_realnum_expr expr-1.235\
   275    280         {i2=9223372036854775807, i1=-1} {i1-i2}    -9223372036854775808
   276         -  test_expr expr-1.236\
          281  +  test_realnum_expr expr-1.236\
   277    282         {i2=9223372036854775807, i1=-2} {i1-i2}    -9.22337203685478e+18
   278         -  test_expr expr-1.237\
          283  +  test_realnum_expr expr-1.237\
   279    284         {i2=9223372036854775807, i1=-100000} {i1-i2} -9.22337203685488e+18
   280         -  test_expr expr-1.238\
          285  +  test_realnum_expr expr-1.238\
   281    286         {i2=9223372036854775807, i1=0} {i1-i2}     -9223372036854775807
   282         -  test_expr expr-1.239\
          287  +  test_realnum_expr expr-1.239\
   283    288         {i2=9223372036854775807, i1=-1} {i1-i2}    -9223372036854775808
   284    289   
   285         -  test_expr expr-1.250\
          290  +  test_realnum_expr expr-1.250\
   286    291         {i1=4294967296, i2=2147483648} {i1*i2}      9.22337203685478e+18
   287         -  test_expr expr-1.251\
          292  +  test_realnum_expr expr-1.251\
   288    293         {i1=4294967296, i2=2147483647} {i1*i2}      9223372032559808512
   289         -  test_expr expr-1.252\
          294  +  test_realnum_expr expr-1.252\
   290    295         {i1=-4294967296, i2=2147483648} {i1*i2}     -9223372036854775808
   291         -  test_expr expr-1.253\
          296  +  test_realnum_expr expr-1.253\
   292    297         {i1=-4294967296, i2=2147483647} {i1*i2}     -9223372032559808512
   293         -  test_expr expr-1.254\
          298  +  test_realnum_expr expr-1.254\
   294    299         {i1=4294967296, i2=-2147483648} {i1*i2}     -9223372036854775808
   295         -  test_expr expr-1.255\
          300  +  test_realnum_expr expr-1.255\
   296    301         {i1=4294967296, i2=-2147483647} {i1*i2}     -9223372032559808512
   297         -  test_expr expr-1.256\
          302  +  test_realnum_expr expr-1.256\
   298    303         {i1=-4294967296, i2=-2147483648} {i1*i2}    9.22337203685478e+18
   299         -  test_expr expr-1.257\
          304  +  test_realnum_expr expr-1.257\
   300    305         {i1=-4294967296, i2=-2147483647} {i1*i2}    9223372032559808512
   301    306   
   302    307   }}
   303    308   
   304    309   ifcapable floatingpoint {
   305    310     test_expr expr-2.1 {r1=1.23, r2=2.34} {r1+r2} 3.57
   306    311     test_expr expr-2.2 {r1=1.23, r2=2.34} {r1-r2} -1.11
................................................................................
   879    884   do_test expr-12.2 {
   880    885     catchsql {
   881    886       SELECT (CASE WHEN a>4 THEN 1 ELSE 0) FROM test1;
   882    887     }
   883    888   } {1 {near ")": syntax error}}
   884    889   
   885    890   ifcapable floatingpoint {
   886         -  do_test expr-13.1 {
          891  +  do_realnum_test expr-13.1 {
   887    892       execsql {
   888    893         SELECT 12345678901234567890;
   889    894       }
   890    895     } {1.23456789012346e+19}
   891    896   }
   892    897   
   893    898   # Implicit String->Integer conversion is used when possible.
................................................................................
   904    909       }
   905    910     } {9223372036854775807}
   906    911   }
   907    912   
   908    913   # If the value is too large, use String->Float conversion.
   909    914   #
   910    915   ifcapable floatingpoint {
   911         -  do_test expr-13.4 {
          916  +  do_realnum_test expr-13.4 {
   912    917       execsql {
   913    918         SELECT 0+'9223372036854775808'
   914    919       }
   915    920     } {9.22337203685478e+18}
   916         -  do_test expr-13.5 {
          921  +  do_realnum_test expr-13.5 {
   917    922       execsql {
   918    923         SELECT '9223372036854775808'+0
   919    924       }
   920    925     } {9.22337203685478e+18}
   921    926   }
   922    927   
   923    928   # Use String->float conversion if the value is explicitly a floating
   924    929   # point value.
   925    930   #
   926         -do_test expr-13.6 {
          931  +do_realnum_test expr-13.6 {
   927    932     execsql {
   928    933       SELECT 0+'9223372036854775807.0'
   929    934     }
   930    935   } {9.22337203685478e+18}
   931         -do_test expr-13.7 {
          936  +do_realnum_test expr-13.7 {
   932    937     execsql {
   933    938       SELECT '9223372036854775807.0'+0
   934    939     }
   935    940   } {9.22337203685478e+18}
   936    941   
   937    942   
   938    943   finish_test

Changes to test/nan.test.

    38     38     set ::STMT [sqlite3_prepare db "INSERT INTO t1 VALUES(?)" -1 TAIL]
    39     39     sqlite3_bind_double $::STMT 1 NaN
    40     40     sqlite3_step $::STMT
    41     41     sqlite3_reset $::STMT
    42     42     db eval {SELECT x, typeof(x) FROM t1}
    43     43   } {{} null}
    44     44   if {$tcl_platform(platform) != "symbian"} {
    45         -  do_test nan-1.1.2 {
           45  +  do_realnum_test nan-1.1.2 {
    46     46       sqlite3_bind_double $::STMT 1 +Inf
    47     47       sqlite3_step $::STMT
    48     48       sqlite3_reset $::STMT
    49     49       db eval {SELECT x, typeof(x) FROM t1}
    50     50     } {{} null inf real}
    51         -  do_test nan-1.1.3 {
           51  +  do_realnum_test nan-1.1.3 {
    52     52       sqlite3_bind_double $::STMT 1 -Inf
    53     53       sqlite3_step $::STMT
    54     54       sqlite3_reset $::STMT
    55     55       db eval {SELECT x, typeof(x) FROM t1}
    56     56     } {{} null inf real -inf real}
    57         -  do_test nan-1.1.4 {
           57  +  do_realnum_test nan-1.1.4 {
    58     58       sqlite3_bind_double $::STMT 1 -NaN
    59     59       sqlite3_step $::STMT
    60     60       sqlite3_reset $::STMT
    61     61       db eval {SELECT x, typeof(x) FROM t1}
    62     62     } {{} null inf real -inf real {} null}
    63         -  do_test nan-1.1.5 {
           63  +  do_realnum_test nan-1.1.5 {
    64     64       sqlite3_bind_double $::STMT 1 NaN0
    65     65       sqlite3_step $::STMT
    66     66       sqlite3_reset $::STMT
    67     67       db eval {SELECT x, typeof(x) FROM t1}
    68     68     } {{} null inf real -inf real {} null {} null}
    69         -  do_test nan-1.1.6 {
           69  +  do_realnum_test nan-1.1.6 {
    70     70       sqlite3_bind_double $::STMT 1 -NaN0
    71     71       sqlite3_step $::STMT
    72     72       sqlite3_reset $::STMT
    73     73       db eval {SELECT x, typeof(x) FROM t1}
    74     74     } {{} null inf real -inf real {} null {} null {} null}
    75     75     do_test nan-1.1.7 {
    76     76       db eval {
................................................................................
   227    227     db eval {SELECT x, typeof(x) FROM t1}
   228    228   } {1e+308 real}
   229    229   
   230    230   if {$tcl_platform(platform) != "symbian"} {
   231    231     # Do not run these tests on Symbian, as the Tcl port doesn't like to
   232    232     # convert from floating point value "-inf" to a string.
   233    233     #
   234         -  do_test nan-4.7 {
          234  +  do_realnum_test nan-4.7 {
   235    235       db eval {DELETE FROM t1}
   236    236       db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)"
   237    237       db eval {SELECT x, typeof(x) FROM t1}
   238    238     } {inf real}
   239         -  do_test nan-4.8 {
          239  +  do_realnum_test nan-4.8 {
   240    240       db eval {DELETE FROM t1}
   241    241       db eval "INSERT INTO t1 VALUES(-[string repeat 9 309].0)"
   242    242       db eval {SELECT x, typeof(x) FROM t1}
   243    243     } {-inf real}
   244    244   }
   245    245   do_test nan-4.9 {
   246    246     db eval {DELETE FROM t1}
................................................................................
   309    309     db eval {DELETE FROM t1}
   310    310     set small \
   311    311         -[string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
   312    312     db eval "INSERT INTO t1 VALUES($small)"
   313    313     db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
   314    314   } {-9.88131291682493e-324 real}
   315    315   
   316         -do_test nan-4.20 {
          316  +do_realnum_test nan-4.20 {
   317    317     db eval {DELETE FROM t1}
   318    318     set big [string repeat 9 10000].0e-9000
   319    319     db eval "INSERT INTO t1 VALUES($big)"
   320    320     db eval {SELECT x, typeof(x) FROM t1}
   321    321   } {inf real}
   322    322   
   323    323   
   324    324   
   325    325   finish_test

Changes to test/pager1.test.

  1649   1649   #-------------------------------------------------------------------------
  1650   1650   # Check that it is not possible to open a database file if the full path
  1651   1651   # to the associated journal file will be longer than sqlite3_vfs.mxPathname.
  1652   1652   #
  1653   1653   testvfs tv -default 1
  1654   1654   tv script xOpenCb
  1655   1655   tv filter xOpen
  1656         -proc xOpenCb {method filename} {
         1656  +proc xOpenCb {method filename args} {
  1657   1657     set ::file_len [string length $filename]
  1658   1658   }
  1659   1659   sqlite3 db test.db
  1660   1660   db close
  1661   1661   tv delete
  1662   1662   
  1663   1663   for {set ii [expr $::file_len-5]} {$ii < [expr $::file_len+20]} {incr ii} {
................................................................................
  2377   2377   } {exclusive 0 main reserved temp closed}
  2378   2378   
  2379   2379   #-------------------------------------------------------------------------
  2380   2380   # Test that if the "page-size" field in a journal-header is 0, the journal
  2381   2381   # file can still be rolled back. This is required for backward compatibility -
  2382   2382   # versions of SQLite prior to 3.5.8 always set this field to zero.
  2383   2383   #
         2384  +if {$tcl_platform(platform)=="unix"} {
  2384   2385   do_test pager1-31.1 {
  2385   2386     faultsim_delete_and_reopen
  2386   2387     execsql {
  2387   2388       PRAGMA cache_size = 10;
  2388   2389       PRAGMA page_size = 1024;
  2389   2390       CREATE TABLE t1(x, y, UNIQUE(x, y));
  2390   2391       INSERT INTO t1 VALUES(randomblob(1500), randomblob(1500));
................................................................................
  2404   2405     file copy test.db test.db2
  2405   2406     file copy test.db-journal test.db2-journal
  2406   2407     
  2407   2408     hexio_write test.db2-journal 24 00000000
  2408   2409     sqlite3 db2 test.db2
  2409   2410     execsql { PRAGMA integrity_check } db2
  2410   2411   } {ok}
  2411         -
         2412  +}
  2412   2413   
  2413   2414   
  2414   2415   finish_test

Changes to test/tester.tcl.

   349    349       puts "\nExpected: \[$expected\]\n     Got: \[$result\]"
   350    350       fail_test $name
   351    351     } else {
   352    352       puts " Ok"
   353    353     }
   354    354     flush stdout
   355    355   }
          356  +
          357  +proc realnum_normalize {r} {
          358  +  string map {1.#INF inf} [regsub -all {(e[+-])0+} $r {\1}]
          359  +}
          360  +proc do_realnum_test {name cmd expected} {
          361  +  uplevel [list do_test $name [
          362  +    subst -nocommands { realnum_normalize [ $cmd ] }
          363  +  ] [realnum_normalize $expected]]
          364  +}
   356    365   
   357    366   proc fix_testname {varname} {
   358    367     upvar $varname testname
   359    368     if {[info exists ::testprefix] 
   360    369      && [string is digit [string range $testname 0 0]]
   361    370     } {
   362    371       set testname "${::testprefix}-$testname"

Changes to test/tkt3838.test.

    21     21   source $testdir/tester.tcl
    22     22   
    23     23   ifcapable !altertable {
    24     24     finish_test
    25     25     return
    26     26   }
    27     27   
    28         -do_test tkt3838-1.1 {
           28  +do_realnum_test tkt3838-1.1 {
    29     29     db eval {
    30     30       PRAGMA encoding=UTF16;
    31     31       CREATE TABLE t1(x);
    32     32       INSERT INTO t1 VALUES(1);
    33     33       ALTER TABLE t1 ADD COLUMN b INTEGER DEFAULT '999';
    34     34       ALTER TABLE t1 ADD COLUMN c REAL DEFAULT '9e99';
    35     35       ALTER TABLE t1 ADD COLUMN d TEXT DEFAULT 'xyzzy';
    36     36       UPDATE t1 SET x=x+1;
    37     37       SELECT * FROM t1;
    38     38     }
    39     39   } {2 999 9e+99 xyzzy}
    40     40   
    41     41   finish_test

Changes to test/tkt3922.test.

    32     32       execsql {
    33     33         CREATE TABLE t1(a NUMBER);
    34     34         INSERT INTO t1 VALUES('-1');
    35     35         SELECT a, typeof(a) FROM t1;
    36     36       }
    37     37     } {-1 integer}
    38     38   }
    39         -do_test tkt3922.2 {
           39  +do_realnum_test tkt3922.2 {
    40     40     execsql {
    41     41       DELETE FROM t1;
    42     42       INSERT INTO t1 VALUES('-9223372036854775809');
    43     43       SELECT a, typeof(a) FROM t1;
    44     44     }
    45     45   } {-9.22337203685478e+18 real}
    46         -do_test tkt3922.3 {
           46  +do_realnum_test tkt3922.3 {
    47     47     execsql {
    48     48       DELETE FROM t1;
    49     49       INSERT INTO t1 VALUES('-9223372036854776832');
    50     50       SELECT a, typeof(a) FROM t1;
    51     51     }
    52     52   } {-9.22337203685478e+18 real}
    53         -do_test tkt3922.4 {
           53  +do_realnum_test tkt3922.4 {
    54     54     execsql {
    55     55       DELETE FROM t1;
    56     56       INSERT INTO t1 VALUES('-9223372036854776833');
    57     57       SELECT a, typeof(a) FROM t1;
    58     58     }
    59     59   } {-9.22337203685478e+18 real}
    60     60   if {[working_64bit_int]} {
................................................................................
    74     74       execsql {
    75     75         DELETE FROM t1;
    76     76         INSERT INTO t1 VALUES('1');
    77     77         SELECT a, typeof(a) FROM t1;
    78     78       }
    79     79     } {1 integer}
    80     80   }
    81         -do_test tkt3922.6 {
           81  +do_realnum_test tkt3922.6 {
    82     82     execsql {
    83     83       DELETE FROM t1;
    84     84       INSERT INTO t1 VALUES('9223372036854775808');
    85     85       SELECT a, typeof(a) FROM t1;
    86     86     }
    87     87   } {9.22337203685478e+18 real}
    88     88   
    89     89   finish_test