Added the "memory:" driver (CVS 158)

FossilOrigin-Name: 54d60c68dc83410e911b828a680772541c44e9df
This commit is contained in:
drh
2000-10-19 14:10:08 +00:00
parent e907bfc2ac
commit 767c2001c6
14 changed files with 684 additions and 446 deletions
+12 -1
View File
@@ -23,7 +23,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE TABLE statement.
#
# $Id: table.test,v 1.6 2000/08/02 13:47:43 drh Exp $
# $Id: table.test,v 1.7 2000/10/19 14:10:09 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -49,6 +49,9 @@ do_test table-1.1 {
#
do_test table-1.2 {
execsql {INSERT INTO test1 VALUES('hi', 'y''all')}
} {}
testif gdbm:
do_test table-1.2b {
lsort [glob -nocomplain testdb/*.tbl]
} {testdb/sqlite_master.tbl testdb/test1.tbl}
@@ -61,6 +64,7 @@ do_test table-1.3 {
# Close and reopen the database. Verify that everything is
# still the same.
#
skipif memory:
do_test table-1.4 {
db close
sqlite db testdb
@@ -76,6 +80,7 @@ do_test table-1.5 {
# Verify that the file associated with the database is gone.
#
testif gdbm:
do_test table-1.5 {
lsort [glob -nocomplain testdb/*.tbl]
} {testdb/sqlite_master.tbl}
@@ -83,6 +88,7 @@ do_test table-1.5 {
# Close and reopen the database. Verify that the table is
# still gone.
#
skipif memory:
do_test table-1.6 {
db close
sqlite db testdb
@@ -121,6 +127,7 @@ do_test table-2.1b {
set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg]
lappend v $msg
} {1 {table sqlite_master already exists}}
skipif memory:
do_test table-2.1c {
db close
sqlite db testdb
@@ -138,6 +145,7 @@ do_test table-2.2a {
set v [catch {execsql {CREATE TABLE test3(two text)}} msg]
lappend v $msg
} {1 {there is already an index named test3}}
skipif memory:
do_test table-2.2b {
db close
sqlite db testdb
@@ -198,6 +206,7 @@ do_test table-3.4 {
set v [catch {execsql {CREATE TABLE bIg(xyz foo)}} msg]
lappend v $msg
} {1 {table bIg already exists}}
skipif memory:
do_test table-3.5 {
db close
sqlite db testdb
@@ -226,6 +235,7 @@ do_test table-4.1 {
}
execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
} $r
skipif memory:
do_test table-4.1b {
db close
sqlite db testdb
@@ -287,6 +297,7 @@ do_test table-5.4 {
# Create a table with a goofy name
#
testif gdbm:
do_test table-6.1 {
execsql {CREATE TABLE 'Spaces In This Name!'(x int)}
execsql {INSERT INTO 'spaces in this name!' VALUES(1)}