/ Check-in [424ce5ec]
Login

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

Overview
Comment:Add trivial tests to increase coverage of sqlite3_table_column_metadata(). (CVS 3074)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:424ce5ecd0aa9860afb73180e4d09987f3a9300a
User & Date: danielk1977 2006-02-10 12:48:55
Context
2006-02-10
13:11
More comments on the unix locking code. Ticket #1672. (CVS 3075) check-in: 4b6f5688 user: drh tags: trunk
12:48
Add trivial tests to increase coverage of sqlite3_table_column_metadata(). (CVS 3074) check-in: 424ce5ec user: danielk1977 tags: trunk
08:24
Work around the case where the pending-byte page is also a a pointer-map page. Ticket #1667. (CVS 3073) check-in: 5ea87fbb user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/colmeta.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
..
69
70
71
72
73
74
75








76
77
#    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 the sqlite3_table_column_metadata() API.
#
# $Id: colmeta.test,v 1.1 2006/02/09 13:43:29 danielk1977 Exp $

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

ifcapable !columnmetadata {
  finish_test
  return
................................................................................
  8  {{} abc4 b}                 {0 {INTEGER BINARY 0 1 1}}
  9  {{} v1 a}                   {1 {no such table column: v1.a}}
  10 {main v1 b}                 {1 {no such table column: v1.b}}
  11 {main v1 badname}           {1 {no such table column: v1.badname}}
  12 {main v1 rowid}             {1 {no such table column: v1.rowid}}
  13 {main abc rowid}            {0 {INTEGER BINARY 0 1 0}}
  14 {main abc3 rowid}           {0 {INTEGER BINARY 0 1 0}}
  14 {main abc4 rowid}           {0 {INTEGER BINARY 0 1 1}}

}

foreach {tn params results} $tests {
  set ::DB [sqlite3_connection_pointer db]

  set tstbody [concat sqlite3_table_column_metadata $::DB $params] 
  do_test colmeta-$tn.1 {
................................................................................
  set ::DB [sqlite3_connection_pointer db]
  set tstbody [concat sqlite3_table_column_metadata $::DB $params] 
  do_test colmeta-$tn.2 {
    list [catch $tstbody msg] [set msg]
  } $results
}









finish_test








|







 







|
>







 







>
>
>
>
>
>
>
>


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#    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 the sqlite3_table_column_metadata() API.
#
# $Id: colmeta.test,v 1.2 2006/02/10 12:48:55 danielk1977 Exp $

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

ifcapable !columnmetadata {
  finish_test
  return
................................................................................
  8  {{} abc4 b}                 {0 {INTEGER BINARY 0 1 1}}
  9  {{} v1 a}                   {1 {no such table column: v1.a}}
  10 {main v1 b}                 {1 {no such table column: v1.b}}
  11 {main v1 badname}           {1 {no such table column: v1.badname}}
  12 {main v1 rowid}             {1 {no such table column: v1.rowid}}
  13 {main abc rowid}            {0 {INTEGER BINARY 0 1 0}}
  14 {main abc3 rowid}           {0 {INTEGER BINARY 0 1 0}}
  15 {main abc4 rowid}           {0 {INTEGER BINARY 0 1 1}}
  16 {main abc d}                {1 {no such table column: abc.d}}
}

foreach {tn params results} $tests {
  set ::DB [sqlite3_connection_pointer db]

  set tstbody [concat sqlite3_table_column_metadata $::DB $params] 
  do_test colmeta-$tn.1 {
................................................................................
  set ::DB [sqlite3_connection_pointer db]
  set tstbody [concat sqlite3_table_column_metadata $::DB $params] 
  do_test colmeta-$tn.2 {
    list [catch $tstbody msg] [set msg]
  } $results
}

do_test colmeta-misuse.1 {
  db close
  set rc [catch {
    sqlite3_table_column_metadata $::DB a b c
  } msg]
  list $rc $msg
} {1 {library routine called out of sequence}}

finish_test