/ Check-in [8eb2c07c]
Login

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

Overview
Comment:Changes to test scripts to accommodate different architectures and different versions of Tcl. (CVS 5057)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8eb2c07c520c12c2cd4610596dbec451c8275e95
User & Date: drh 2008-04-28 13:02:58
Context
2008-04-28
15:23
Work around a NaN bug in some versions of Tcl. (CVS 5058) check-in: 7bf8213c user: drh tags: trunk
13:02
Changes to test scripts to accommodate different architectures and different versions of Tcl. (CVS 5057) check-in: 8eb2c07c user: drh tags: trunk
12:54
Restore the #include of stdint.h removed in (5051). (CVS 5056) check-in: e96e8b9b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/tclsqlite.test.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
# This file implements regression tests for TCL interface to the
# SQLite library. 
#
# Actually, all tests are based on the TCL interface, so the main
# interface is pretty well tested.  This file contains some addition
# tests for fringe issues that the main test suite does not cover.
#
# $Id: tclsqlite.test,v 1.63 2007/10/23 08:17:48 danielk1977 Exp $

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

# Check the error messages generated by tclsqlite
#
if {[sqlite3 -has-codec]} {
................................................................................
  set v [catch {
    db eval {SELECT * FROM t1} data {
      break
    }
  } msg]
  lappend v $msg
} {0 {}}

do_test tcl-1.6 {
  set v [catch {
    db eval {SELECT * FROM t1} data {
      expr x*
    }
  } msg]
  regsub {:.*$} $msg {} msg
  lappend v $msg
} {1 {syntax error in expression "x*"}}

do_test tcl-1.7 {
  set v [catch {db} msg]
  lappend v $msg
} {1 {wrong # args: should be "db SUBCOMMAND ..."}}
if {[catch {db auth {}}]==0} {
  do_test tcl-1.8 {
    set v [catch {db authorizer 1 2 3} msg]







|







 







>






<

<
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78

79

80
81
82
83
84
85
86
87
# This file implements regression tests for TCL interface to the
# SQLite library. 
#
# Actually, all tests are based on the TCL interface, so the main
# interface is pretty well tested.  This file contains some addition
# tests for fringe issues that the main test suite does not cover.
#
# $Id: tclsqlite.test,v 1.64 2008/04/28 13:02:58 drh Exp $

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

# Check the error messages generated by tclsqlite
#
if {[sqlite3 -has-codec]} {
................................................................................
  set v [catch {
    db eval {SELECT * FROM t1} data {
      break
    }
  } msg]
  lappend v $msg
} {0 {}}
catch {expr x*} msg
do_test tcl-1.6 {
  set v [catch {
    db eval {SELECT * FROM t1} data {
      expr x*
    }
  } msg]

  lappend v $msg

} [list 1 $msg]
do_test tcl-1.7 {
  set v [catch {db} msg]
  lappend v $msg
} {1 {wrong # args: should be "db SUBCOMMAND ..."}}
if {[catch {db auth {}}]==0} {
  do_test tcl-1.8 {
    set v [catch {db authorizer 1 2 3} msg]

Changes to test/types3.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84
85
86
87
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The focus
# of this file is testing the interaction of SQLite manifest types
# with Tcl dual-representations.
#
# $Id: types3.test,v 1.7 2007/06/26 22:42:56 drh Exp $
#

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

# A variable with only a string representation comes in as TEXT
do_test types3-1.1 {
................................................................................
    tcl_variable_type V
  } bytearray
}
do_test types3-2.2 {
  set V [db one {SELECT 123}]
  tcl_variable_type V
} int

do_test types3-2.3 {
  set V [db one {SELECT 1234567890123456}]
  tcl_variable_type V
} wideInt
do_test types3-2.4.1 {
  set V [db one {SELECT 1234567890123456.1}]
  tcl_variable_type V
} double
do_test types3-2.4.2 {
  set V [db one {SELECT 1234567890123.456}]
  tcl_variable_type V







|







 







>



|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The focus
# of this file is testing the interaction of SQLite manifest types
# with Tcl dual-representations.
#
# $Id: types3.test,v 1.8 2008/04/28 13:02:58 drh Exp $
#

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

# A variable with only a string representation comes in as TEXT
do_test types3-1.1 {
................................................................................
    tcl_variable_type V
  } bytearray
}
do_test types3-2.2 {
  set V [db one {SELECT 123}]
  tcl_variable_type V
} int
set Vx [expr {1+wide(123456789123456)}]
do_test types3-2.3 {
  set V [db one {SELECT 1234567890123456}]
  tcl_variable_type V
} [tcl_variable_type Vx]
do_test types3-2.4.1 {
  set V [db one {SELECT 1234567890123456.1}]
  tcl_variable_type V
} double
do_test types3-2.4.2 {
  set V [db one {SELECT 1234567890123.456}]
  tcl_variable_type V