SQLite

Check-in [ccbd2efeba]
Login

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

Overview
Comment:Fix the incrblob.test on windows. Disable line terminator translation. (CVS 4380)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ccbd2efebaecfd26d7016eb6684ad26c0bcc4e6b
User & Date: drh 2007-09-03 16:45:36.000
Context
2007-09-03
17:02
Get the io.test tests working on windows. (CVS 4381) (check-in: 1be70015e2 user: drh tags: trunk)
16:45
Fix the incrblob.test on windows. Disable line terminator translation. (CVS 4380) (check-in: ccbd2efeba user: drh tags: trunk)
16:12
Enable threadsafe builds by default in configure. Ticket #2606. Changes to test scripts to do better testing under all configurations. (CVS 4379) (check-in: d66e08fd4f user: drh 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.15 2007/09/01 18:24: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.16 2007/09/03 16:45:36 drh Exp $
#

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

ifcapable {!autovacuum || !pragma || !incrblob} {
  finish_test
346
347
348
349
350
351
352

353

354
355
356
357
358
359
360
361

362
363
364
365
366
367
368
  set ::size [expr [file size [info script]]]
  execsql {
    ATTACH 'test2.db' AS aux;
    CREATE TABLE aux.files(name, text);
    INSERT INTO aux.files VALUES('this one', zeroblob($::size));
  }
  set fd  [db incrblob aux files text 1]

  set fd2 [open [info script]]

  puts -nonewline $fd [read $fd2]
  close $fd
  close $fd2
  set ::text [db one {select text from aux.files}]
  string length $::text
} [file size [info script]]
do_test incrblob-5.2 {
  set fd2 [open [info script]]

  set ::data [read $fd2]
  close $fd2
  set ::data
} $::text

# free memory
unset ::data







>

>








>







346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
  set ::size [expr [file size [info script]]]
  execsql {
    ATTACH 'test2.db' AS aux;
    CREATE TABLE aux.files(name, text);
    INSERT INTO aux.files VALUES('this one', zeroblob($::size));
  }
  set fd  [db incrblob aux files text 1]
  fconfigure $fd -translation binary
  set fd2 [open [info script]]
  fconfigure $fd2 -translation binary
  puts -nonewline $fd [read $fd2]
  close $fd
  close $fd2
  set ::text [db one {select text from aux.files}]
  string length $::text
} [file size [info script]]
do_test incrblob-5.2 {
  set fd2 [open [info script]]
  fconfigure $fd2 -translation binary
  set ::data [read $fd2]
  close $fd2
  set ::data
} $::text

# free memory
unset ::data
522
523
524
525
526
527
528

529
530
531
532
533
534
535
      SELECT d FROM t1;
    }
  } {15}

}

set fd [open [info script]]

set ::data [read $fd 14000]
close $fd

db close
file delete -force test.db test.db-journal
sqlite3 db test.db








>







525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
      SELECT d FROM t1;
    }
  } {15}

}

set fd [open [info script]]
fconfigure $fd -translation binary
set ::data [read $fd 14000]
close $fd

db close
file delete -force test.db test.db-journal
sqlite3 db test.db