aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2006-03-29 00:24:06 +0000
committerdrh <drh@noemail.net>2006-03-29 00:24:06 +0000
commite4df0e7497570d25af9c16ec9e8e90560eb0debc (patch)
tree591c2ac0f086aea84852ed0801bec9b9b0b2d57d /test
parent27436af790273ce50212fd67473f03b0c99bb63b (diff)
downloadsqlite-e4df0e7497570d25af9c16ec9e8e90560eb0debc.tar.gz
sqlite-e4df0e7497570d25af9c16ec9e8e90560eb0debc.zip
Properly record the names of triggers even if the name is quoted.
Ticket #1737. (CVS 3158) FossilOrigin-Name: 4ba280ddd66d5cbf617263d6300b7582f65d47a9
Diffstat (limited to 'test')
-rw-r--r--test/index.test5
-rw-r--r--test/table.test5
-rw-r--r--test/trigger1.test16
3 files changed, 23 insertions, 3 deletions
diff --git a/test/index.test b/test/index.test
index 113bbf06e..69427e830 100644
--- a/test/index.test
+++ b/test/index.test
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE INDEX statement.
#
-# $Id: index.test,v 1.41 2006/01/17 09:35:02 danielk1977 Exp $
+# $Id: index.test,v 1.42 2006/03/29 00:24:07 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -182,6 +182,9 @@ do_test index-6.1 {
set v [catch {execsql {CREATE INDEX index1 ON test2(g1)}} msg]
lappend v $msg
} {1 {index index1 already exists}}
+do_test index-6.1.1 {
+ catchsql {CREATE INDEX [index1] ON test2(g1)}
+} {1 {index index1 already exists}}
do_test index-6.1b {
execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
} {index1 test1 test2}
diff --git a/test/table.test b/test/table.test
index a4e9858fe..18cb806c7 100644
--- a/test/table.test
+++ b/test/table.test
@@ -11,7 +11,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.44 2006/01/04 21:40:07 drh Exp $
+# $Id: table.test,v 1.45 2006/03/29 00:24:07 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -92,6 +92,9 @@ do_test table-2.1 {
execsql {CREATE TABLE TEST2(one text)}
catchsql {CREATE TABLE test2(two text default 'hi')}
} {1 {table test2 already exists}}
+do_test table-2.1.1 {
+ catchsql {CREATE TABLE "test2" (two)}
+} {1 {table "test2" already exists}}
do_test table-2.1b {
set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg]
lappend v $msg
diff --git a/test/trigger1.test b/test/trigger1.test
index a8f9d6698..3147927f8 100644
--- a/test/trigger1.test
+++ b/test/trigger1.test
@@ -60,13 +60,27 @@ execsql {
INSERT INTO t1 values(1);
END;
}
-do_test trigger1-1.2 {
+do_test trigger1-1.2.1 {
catchsql {
CREATE TRIGGER tr1 DELETE ON t1 BEGIN
SELECT * FROM sqlite_master;
END
}
} {1 {trigger tr1 already exists}}
+do_test trigger1-1.2.2 {
+ catchsql {
+ CREATE TRIGGER "tr1" DELETE ON t1 BEGIN
+ SELECT * FROM sqlite_master;
+ END
+ }
+} {1 {trigger "tr1" already exists}}
+do_test trigger1-1.2.3 {
+ catchsql {
+ CREATE TRIGGER [tr1] DELETE ON t1 BEGIN
+ SELECT * FROM sqlite_master;
+ END
+ }
+} {1 {trigger [tr1] already exists}}
do_test trigger1-1.3 {
catchsql {