SQLite

Check-in [168112c8b7]
Login

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

Overview
Comment:Get all tests working under win2k. (CVS 1753)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 168112c8b76af132c675a6508d3ee7764ef7a845
User & Date: drh 2004-06-28 11:52:46.000
Context
2004-06-28
13:09
More coverage testing. (CVS 1754) (check-in: 3329210410 user: danielk1977 tags: trunk)
11:52
Get all tests working under win2k. (CVS 1753) (check-in: 168112c8b7 user: drh tags: trunk)
08:25
Add a simple test case for inter-process locking. (CVS 1752) (check-in: b0fcc99d22 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/enc2.test.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The focus of
# this file is testing the SQLite routines used for converting between the
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
# UTF-16be).
#
# $Id: enc2.test,v 1.14 2004/06/23 12:35:16 danielk1977 Exp $

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

# The rough organisation of tests in this file is:
#
# enc2.1.*: Simple tests with a UTF-8 db.







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The focus of
# this file is testing the SQLite routines used for converting between the
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
# UTF-16be).
#
# $Id: enc2.test,v 1.15 2004/06/28 11:52:46 drh Exp $

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

# The rough organisation of tests in this file is:
#
# enc2.1.*: Simple tests with a UTF-8 db.
298
299
300
301
302
303
304

305
306
307
308
309
310
311
do_test enc2-6.3 {
  add_test_function $DB 0 0 1
  execsql {
    SELECT test_function('sqlite')
  }
} {{UTF-16BE sqlite}}


file delete -force test.db
set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16LE'}
do_test enc2-6.3 {
  execsql {
    CREATE TABLE t5(a);
    INSERT INTO t5 VALUES('sqlite');







>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
do_test enc2-6.3 {
  add_test_function $DB 0 0 1
  execsql {
    SELECT test_function('sqlite')
  }
} {{UTF-16BE sqlite}}

db close
file delete -force test.db
set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16LE'}
do_test enc2-6.3 {
  execsql {
    CREATE TABLE t5(a);
    INSERT INTO t5 VALUES('sqlite');
330
331
332
333
334
335
336

337
338
339
340
341
342
343
do_test enc2-6.6 {
  add_test_function $DB 0 0 1
  execsql {
    SELECT test_function('sqlite')
  }
} {{UTF-16BE sqlite}}


file delete -force test.db
set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16BE'}
do_test enc2-6.7 {
  execsql {
    CREATE TABLE t5(a);
    INSERT INTO t5 VALUES('sqlite');







>







331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
do_test enc2-6.6 {
  add_test_function $DB 0 0 1
  execsql {
    SELECT test_function('sqlite')
  }
} {{UTF-16BE sqlite}}

db close
file delete -force test.db
set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16BE'}
do_test enc2-6.7 {
  execsql {
    CREATE TABLE t5(a);
    INSERT INTO t5 VALUES('sqlite');
409
410
411
412
413
414
415
416
417
418
419
420
} {UTF-8}

db close
db2 close


finish_test












<
<
<
<
<
411
412
413
414
415
416
417





} {UTF-8}

db close
db2 close


finish_test





Changes to test/lock2.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2001 September 15
#
# 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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is database locks between competing processes.
#
# $Id: lock2.test,v 1.1 2004/06/28 08:25:48 danielk1977 Exp $


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

# Launch another testfixture process to be controlled by this one. A
# channel name is returned that may be passed as the first argument to proc













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2001 September 15
#
# 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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is database locks between competing processes.
#
# $Id: lock2.test,v 1.2 2004/06/28 11:52:46 drh Exp $


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

# Launch another testfixture process to be controlled by this one. A
# channel name is returned that may be passed as the first argument to proc
149
150
151
152
153
154
155
156

157

  testfixture $::tf1 {
    db eval {
      SELECT * FROM sqlite_master;
    }
  }
} {table abc abc 2 {CREATE TABLE abc(a, b, c)}}

finish_test










|
>

>
149
150
151
152
153
154
155
156
157
158
159
  testfixture $::tf1 {
    db eval {
      SELECT * FROM sqlite_master;
    }
  }
} {table abc abc 2 {CREATE TABLE abc(a, b, c)}}

catch {testfixture $::tf1 {db close}}
catch {close $::tf1}

finish_test