SQLite

Check-in [753caa20ca]
Login

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

Overview
Comment:Add a couple of (fconfigure) commands to configure the incremental blob channels used by test file incrblob.test. This is required so that the tests work on windows and other platforms that have a default -translation mode other than 'lf'. (CVS 5692)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 753caa20ca50bc42d747d934ccc61438790e7f32
User & Date: danielk1977 2008-09-11 11:28:00.000
Context
2008-09-12
10:22
Add a case to permutations.test to run tests with the IOCAP_SAFEAPPEND property set. (CVS 5693) (check-in: 80bdaafa77 user: danielk1977 tags: trunk)
2008-09-11
11:28
Add a couple of (fconfigure) commands to configure the incremental blob channels used by test file incrblob.test. This is required so that the tests work on windows and other platforms that have a default -translation mode other than 'lf'. (CVS 5692) (check-in: 753caa20ca user: danielk1977 tags: trunk)
10:29
Fix a couple of problems with variable initializations picked up by stricter compilers. (CVS 5691) (check-in: f4293d1480 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/incrblob.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2007 May 1
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: incrblob.test,v 1.20 2008/04/24 09:49:55 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable {!autovacuum || !pragma || !incrblob} {
  finish_test











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2007 May 1
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: incrblob.test,v 1.21 2008/09/11 11:28:00 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable {!autovacuum || !pragma || !incrblob} {
  finish_test
562
563
564
565
566
567
568

569
570
571
572
573
574
575
do_test incrblob-7.2.1 {
  execsql {
    PRAGMA auto_vacuum = "incremental";
    CREATE TABLE t1(a INTEGER PRIMARY KEY, b);        -- root@page3
    INSERT INTO t1 VALUES(123, $::data);
  }
  set ::b [db incrblob -readonly t1 b 123]

  read $::b
} $::data
do_test incrblob-7.2.2 {
  execsql {
    CREATE TABLE t2(a INTEGER PRIMARY KEY, b);        -- root@page4
  }
  seek $::b 0







>







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
do_test incrblob-7.2.1 {
  execsql {
    PRAGMA auto_vacuum = "incremental";
    CREATE TABLE t1(a INTEGER PRIMARY KEY, b);        -- root@page3
    INSERT INTO t1 VALUES(123, $::data);
  }
  set ::b [db incrblob -readonly t1 b 123]
  fconfigure $::b -translation binary
  read $::b
} $::data
do_test incrblob-7.2.2 {
  execsql {
    CREATE TABLE t2(a INTEGER PRIMARY KEY, b);        -- root@page4
  }
  seek $::b 0
584
585
586
587
588
589
590

591
592
593
594
595
596
597

set ::otherdata "[string range $::data 0 1000][string range $::data 1001 end]"
do_test incrblob-7.3.1 {
  execsql {
    INSERT INTO t2 VALUES(456, $::otherdata);
  }
  set ::b [db incrblob -readonly t2 b 456]

  read $::b
} $::otherdata
do_test incrblob-7.3.2 {
  expr [file size test.db]/1024
} 30
do_test incrblob-7.3.3 {
  execsql {







>







585
586
587
588
589
590
591
592
593
594
595
596
597
598
599

set ::otherdata "[string range $::data 0 1000][string range $::data 1001 end]"
do_test incrblob-7.3.1 {
  execsql {
    INSERT INTO t2 VALUES(456, $::otherdata);
  }
  set ::b [db incrblob -readonly t2 b 456]
  fconfigure $::b -translation binary
  read $::b
} $::otherdata
do_test incrblob-7.3.2 {
  expr [file size test.db]/1024
} 30
do_test incrblob-7.3.3 {
  execsql {