/ Check-in [cdab6dad]
Login
Overview
Comment:Add tests to prevent a recurrance of bug #16. Also: put a hyperlink to the new ticket screen on the main page of the website. (CVS 527)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cdab6dad323dd1e95ec8b7684a7c4b06c75905e0
User & Date: drh 2002-04-12 13:11:53
Context
2002-04-12
13:12
Version 2.4.7 (CVS 528) check-in: 977abbae user: drh tags: trunk
13:11
Add tests to prevent a recurrance of bug #16. Also: put a hyperlink to the new ticket screen on the main page of the website. (CVS 527) check-in: cdab6dad user: drh tags: trunk
10:08
Fix for bug #15: Add the sqlite_changes() API function for retrieving the number of rows that changed in the previous operation. (CVS 526) check-in: 6e71493b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/insert.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
158
159
160
161
162
163
164


165
166
167
168
169
170
171
...
188
189
190
191
192
193
194



195










196
#    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 file is testing the INSERT statement.
#
# $Id: insert.test,v 1.9 2002/02/19 13:39:23 drh Exp $

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

# Try to insert into a non-existant table.
#
do_test insert-1.1 {
................................................................................
} {22 -4.44 hi abc-123 wham}
do_test insert-3.5 {
  set x [execsql {PRAGMA integrity_check}]
  if {$x==""} {set x ok}
  set x
} {ok}



do_test insert-4.1 {
  execsql {
    CREATE TABLE t3(a,b,c);
    INSERT INTO t3 VALUES(1+2+3,4,5);
    SELECT * FROM t3;
  }
} {6 4 5}
................................................................................
  }
} {{} 6 7 6 4 5 7 5 6}
do_test insert-4.5 {
  execsql {
    SELECT b,c FROM t3 WHERE a IS NULL;
  }
} {6 7}














finish_test







|







 







>
>







 







>
>
>
|
>
>
>
>
>
>
>
>
>
>

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#    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 file is testing the INSERT statement.
#
# $Id: insert.test,v 1.10 2002/04/12 13:11:53 drh Exp $

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

# Try to insert into a non-existant table.
#
do_test insert-1.1 {
................................................................................
} {22 -4.44 hi abc-123 wham}
do_test insert-3.5 {
  set x [execsql {PRAGMA integrity_check}]
  if {$x==""} {set x ok}
  set x
} {ok}

# Test of expressions in the VALUES clause
#
do_test insert-4.1 {
  execsql {
    CREATE TABLE t3(a,b,c);
    INSERT INTO t3 VALUES(1+2+3,4,5);
    SELECT * FROM t3;
  }
} {6 4 5}
................................................................................
  }
} {{} 6 7 6 4 5 7 5 6}
do_test insert-4.5 {
  execsql {
    SELECT b,c FROM t3 WHERE a IS NULL;
  }
} {6 7}
do_test insert-4.6 {
  catchsql {
    INSERT INTO t3 VALUES(notafunc(2,3),2,3);
  }
} {1 {no such function: notafunc}}
do_test insert-4.7 {
  execsql {
    INSERT INTO t3 VALUES(min(1,2,3),max(1,2,3),99);
    SELECT * FROM t3 WHERE c=99;
  }
} {1 3 99}

# Test

finish_test

Changes to www/index.tcl.

1
2
3
4
5
6
7
8
9
10
11
..
25
26
27
28
29
30
31
32
33
34



35



36
37
38

39
40
41
42
43
44
45
..
59
60
61
62
63
64
65
66
67
68


69
70
71
72
73
74
75
76
#
# Run this TCL script to generate HTML for the index.html file.
#
set rcsid {$Id: index.tcl,v 1.58 2002/04/03 20:50:21 drh Exp $}

puts {<html>
<head><title>SQLite: An SQL Database Engine In A C Library</title></head>
<body bgcolor=white>
<h1 align=center>SQLite: An SQL Database Engine In A C Library</h1>
<p align=center>}
puts "This page was last modified on [lrange $rcsid 3 4] UTC<br>"
................................................................................
an example of how to use the SQLite library.</p>

<p>SQLite is <b>not</b> a client library used to connect to a
big database server.  SQLite <b>is</b> the server.  The SQLite
library reads and writes directly to and from the database files
on disk.</p>}

puts {<table align="right"hspace="10">
<tr><td align="center" bgcolor="#8ee5ee">
<table border="2"><tr><td align="center">



<a href="download.html"><big><b>Download<br>SQLite



</td></tr></table>
</td></tr>
</table>}


puts {<h2>Features</h2>

<p><ul>
<li>Implements a large subset of SQL92.</li>
<li>A complete database (with multiple tables and indices) is
    stored in a single disk file.</li>
................................................................................
</p>
}

puts {<h2>Current Status</h2>

<p>A <a href="changes.html">Change Summary</a> is available on this
website.  You can also access a detailed
<a href="http://cvs.hwaci.com:2080/sqlite/timeline">change history</a>
and a list of
<a href="http://cvs.hwaci.com:2080/sqlite/rptview?rn=2">open bugs</a> 


from the 
<a href="http://cvs.hwaci.com:2080/sqlite/">CVS server</a>.</p>

<p>Complete source code and precompiled binaries for the latest release are
<a href="download.html">available for download</a> on this site.  You
can also obtain the latest changes by anonymous CVS access:
<blockquote><pre>
cvs -d :pserver:anonymous@cvs.hwaci.com:/home/cvs/sqlite login



|







 







|
|
|
>
>
>
|
>
>
>


|
>







 







|
<
|
>
>
|







1
2
3
4
5
6
7
8
9
10
11
..
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
66
67
68
69
70
71
72
73

74
75
76
77
78
79
80
81
82
83
84
#
# Run this TCL script to generate HTML for the index.html file.
#
set rcsid {$Id: index.tcl,v 1.59 2002/04/12 13:11:53 drh Exp $}

puts {<html>
<head><title>SQLite: An SQL Database Engine In A C Library</title></head>
<body bgcolor=white>
<h1 align=center>SQLite: An SQL Database Engine In A C Library</h1>
<p align=center>}
puts "This page was last modified on [lrange $rcsid 3 4] UTC<br>"
................................................................................
an example of how to use the SQLite library.</p>

<p>SQLite is <b>not</b> a client library used to connect to a
big database server.  SQLite <b>is</b> the server.  The SQLite
library reads and writes directly to and from the database files
on disk.</p>}

puts {
<table align="right" hspace="10" cellpadding=0 cellspacing=0 broder=0>
<tr><td align="right" bgcolor="#cacae4">
<table border="2" width="100%" cellspacing=0 cellpadding=5><tr><td align="left">
Quick Links:
<ul>
<li><a href="download.html">Download</a></li>
<li><a href="http://cvs.hwaci.com:2080/sqlite/timeline">Change Log</a></li>
<li><a href="http://cvs.hwaci.com:2080/sqlite/tktnew">Report a bug</a></li>
</ul>
</td></tr></table>
</td></tr>
</table>
}

puts {<h2>Features</h2>

<p><ul>
<li>Implements a large subset of SQL92.</li>
<li>A complete database (with multiple tables and indices) is
    stored in a single disk file.</li>
................................................................................
</p>
}

puts {<h2>Current Status</h2>

<p>A <a href="changes.html">Change Summary</a> is available on this
website.  You can also access a detailed
<a href="http://cvs.hwaci.com:2080/sqlite/timeline">change history</a>,

<a href="http://cvs.hwaci.com:2080/sqlite/rptview?rn=2">view open bugs</a>,
or
<a href="http://cvs.hwaci.com:2080/sqlite/tktnew">report new bugs</a>
at the
<a href="http://cvs.hwaci.com:2080/sqlite/">CVS server</a>.</p>

<p>Complete source code and precompiled binaries for the latest release are
<a href="download.html">available for download</a> on this site.  You
can also obtain the latest changes by anonymous CVS access:
<blockquote><pre>
cvs -d :pserver:anonymous@cvs.hwaci.com:/home/cvs/sqlite login