/ Check-in [9fb92024]
Login

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

Overview
Comment:Fix a bug in the new misc6.test script. Fix error messages when not compiled with memory debugging enabled. Ticket #1957. (CVS 3392)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9fb92024bf5058bdc32066a0d07b93da575779fa
User & Date: drh 2006-09-04 18:54:14
Context
2006-09-05
18:21
A minor change to fts1.c to fix broken build. (CVS 3393) check-in: 55a03b96 user: adamd tags: trunk
2006-09-04
18:54
Fix a bug in the new misc6.test script. Fix error messages when not compiled with memory debugging enabled. Ticket #1957. (CVS 3392) check-in: 9fb92024 user: drh tags: trunk
15:53
Make sure strings returned by sqlite3_value_text() and sqlite3_value_text16() are always '\000'-terminated. (CVS 3391) check-in: 2c63588b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/altermalloc.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ALTER TABLE statement and
# specifically out-of-memory conditions within that command.
#
# $Id: altermalloc.test,v 1.2 2005/08/21 18:21:50 drh Exp $
#

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_DEBUG..."
  finish_test
  return
}

# If SQLITE_OMIT_ALTERTABLE is defined, omit this file.
ifcapable !altertable {
  finish_test







|








|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ALTER TABLE statement and
# specifically out-of-memory conditions within that command.
#
# $Id: altermalloc.test,v 1.3 2006/09/04 18:54:14 drh Exp $
#

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG=1"
  finish_test
  return
}

# If SQLITE_OMIT_ALTERTABLE is defined, omit this file.
ifcapable !altertable {
  finish_test

Changes to test/attachmalloc.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ATTACH statement and
# specifically out-of-memory conditions within that command.
#
# $Id: attachmalloc.test,v 1.2 2005/08/21 18:21:50 drh Exp $
#

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_DEBUG..."
  finish_test
  return
}


# Usage: do_malloc_test <test name> <options...>
#







|








|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ATTACH statement and
# specifically out-of-memory conditions within that command.
#
# $Id: attachmalloc.test,v 1.3 2006/09/04 18:54:14 drh Exp $
#

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG=1"
  finish_test
  return
}


# Usage: do_malloc_test <test name> <options...>
#

Changes to test/malloc2.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file attempts to check that the library can recover from a malloc()
# failure when sqlite3_global_recover() is invoked.
#
# $Id: malloc2.test,v 1.4 2005/12/06 12:53:01 danielk1977 Exp $

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_DEBUG..."
  finish_test
  return
}

ifcapable !globalrecover {
  finish_test
  return







|







|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file attempts to check that the library can recover from a malloc()
# failure when sqlite3_global_recover() is invoked.
#
# $Id: malloc2.test,v 1.5 2006/09/04 18:54:14 drh Exp $

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
  puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG=1"
  finish_test
  return
}

ifcapable !globalrecover {
  finish_test
  return

Changes to test/misc6.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
37
38
39
40
41
42
43

44
45
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to make sure sqlite3_value_text()
# always returns a null-terminated string.
#
# $Id: misc6.test,v 1.1 2006/09/04 15:53:53 drh Exp $

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

do_test misc6-1.1 {
  set DB [sqlite3_connection_pointer db]
  sqlite3_create_function $DB
................................................................................
  set sqlite_static_bind_nbyte 5
  sqlite_bind $STMT 1 {} static-nbytes
  sqlite3_step $STMT
} SQLITE_ROW
do_test misc6-1.4 {
  sqlite3_column_text $STMT 0
} {00300031003200330034}


finish_test







|







 







>


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
37
38
39
40
41
42
43
44
45
46
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to make sure sqlite3_value_text()
# always returns a null-terminated string.
#
# $Id: misc6.test,v 1.2 2006/09/04 18:54:14 drh Exp $

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

do_test misc6-1.1 {
  set DB [sqlite3_connection_pointer db]
  sqlite3_create_function $DB
................................................................................
  set sqlite_static_bind_nbyte 5
  sqlite_bind $STMT 1 {} static-nbytes
  sqlite3_step $STMT
} SQLITE_ROW
do_test misc6-1.4 {
  sqlite3_column_text $STMT 0
} {00300031003200330034}
sqlite3_finalize $STMT

finish_test