/ Check-in [ccbd2efe]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ccbd2efebaecfd26d7016eb6684ad26c0bcc4e6b
User & Date: drh 2007-09-03 16:45:36
Context
2007-09-03
17:02
Get the io.test tests working on windows. (CVS 4381) check-in: 1be70015 user: drh tags: trunk
16:45
Fix the incrblob.test on windows. Disable line terminator translation. (CVS 4380) check-in: ccbd2efe 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: d66e08fd user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/incrblob.test.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
346
347
348
349
350
351
352

353

354
355
356
357
358
359
360
361

362
363
364
365
366
367
368
...
522
523
524
525
526
527
528

529
530
531
532
533
534
535
#
#    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
................................................................................
  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
................................................................................
      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








|







 







>

>








>







 







>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
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
...
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
#
#    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
................................................................................
  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
................................................................................
      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