gitlab.com/CoiaPrant/sqlite3@v1.19.1/testdata/tcl/chunksize.test (about)

     1  # 2019 June 5
     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  #
    12  
    13  set testdir [file dirname $argv0]
    14  source $testdir/tester.tcl
    15  set testprefix chunksize
    16  
    17  if {$::tcl_platform(platform)!="unix"} {
    18    finish_test
    19    return
    20  }
    21  
    22  foreach {tn jrnlmode} {
    23    1 delete
    24    2 wal
    25  } {
    26    reset_db
    27    file_control_chunksize_test db main 32768
    28    do_execsql_test $tn.0 " PRAGMA journal_mode = $jrnlmode " $jrnlmode
    29    do_execsql_test $tn.1 {
    30      CREATE TABLE t1(a, b);
    31      INSERT INTO t1 VALUES(1, 2);
    32    }
    33  
    34    execsql { PRAGMA wal_checkpoint }
    35  
    36    do_test $tn.2 {
    37      file size test.db
    38    } 32768
    39  }
    40  
    41  finish_test