Rename all tests so that the first part of the test name corresponds to the

file that contains that test.  This makes it much easier to find a particular
test after it fail. (CVS 749)

FossilOrigin-Name: 6cb80ae10af60863cc25c22a6442ba1d43b7409c
This commit is contained in:
drh 2002-09-14 12:04:56 +00:00
parent 6eba16f3d7
commit 41a3bd0a01
5 changed files with 76 additions and 76 deletions

View File

@ -1,5 +1,5 @@
C Update\sthe\sSQL\slanguage\sdocumentation\sto\stalk\sabout\sSELECT\sDISTINCT.\s(CVS\s748)
D 2002-09-12T14:08:32
C Rename\sall\stests\sso\sthat\sthe\sfirst\spart\sof\sthe\stest\sname\scorresponds\sto\sthe\nfile\sthat\scontains\sthat\stest.\s\sThis\smakes\sit\smuch\seasier\sto\sfind\sa\sparticular\ntest\safter\sit\sfail.\s(CVS\s749)
D 2002-09-14T12:04:56
F Makefile.in d6c9a85c2a5e696843201d090dcf8bf2f8716f2a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@ -104,9 +104,9 @@ F test/tclsqlite.test 6f4b9760681c7dbca52a18d0ab46a1679cdc79b9
F test/temptable.test 03b7bdb7d6ce2c658ad20c94b037652c6cad34e0
F test/tester.tcl 6f603d90881bd835ea27c568a7fecaa57dce91cc
F test/trans.test 10b53c77e2cc4ad9529c15fdcb390b8d5722ea65
F test/trigger1.test bb63749fa8a395a60541100607d86381604b7194
F test/trigger2.test 19070bdb7cdcb2b163170d864fc2fd289b2d73ef
F test/trigger3.test 7b4cbeb70e0875495516dd27de180552834708d4
F test/trigger1.test ec1da76e1a9f618deb96e505f459dcf8a23f2247
F test/trigger2.test ee346d8c612e7f847c9543058f1b89d094d27ffb
F test/trigger3.test 2bf76f7367a36242f670026af542d9f60efe3dc6
F test/trigger4.test 9a5c1406344d743020c2753ae8d6dfe6eb75f818
F test/unique.test 572aa791327c1e8d797932263e9d67f176cfdb44
F test/update.test 7ffb062d580a972e7870d0f51d5af3ab9bfeae08
@ -149,7 +149,7 @@ F www/speed.tcl a20a792738475b68756ea7a19321600f23d1d803
F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
P 23fe36c7e88282f6d1b7547ab892ea88f0e65262
R cb437ad4d3f01e7699b3e8bb2797f1f9
P ef7116751ddc4e82228c115b0a332ffb47a22ae5
R 8189584121ea08912ee4948047822dc1
U drh
Z 0ee1932374e268052ad2e19b552bf00b
Z 5104f4a49d2a5667b7c13a5b97f926e5

View File

@ -1 +1 @@
ef7116751ddc4e82228c115b0a332ffb47a22ae5
6cb80ae10af60863cc25c22a6442ba1d43b7409c

View File

@ -30,7 +30,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_test trig_cd-1.1 {
do_test trigger1-1.1 {
catchsql {
CREATE TRIGGER trig UPDATE ON no_such_table BEGIN
SELECT * from sqlite_master;
@ -46,7 +46,7 @@ execsql {
INSERT INTO t1 values(1);
END;
}
do_test trig_cd-1.2 {
do_test trigger1-1.2 {
catchsql {
CREATE TRIGGER tr1 DELETE ON t1 BEGIN
SELECT * FROM sqlite_master;
@ -54,7 +54,7 @@ do_test trig_cd-1.2 {
}
} {1 {trigger tr1 already exists}}
do_test trig_cd-1.3 {
do_test trigger1-1.3 {
catchsql {
BEGIN;
CREATE TRIGGER tr2 INSERT ON t1 BEGIN
@ -65,7 +65,7 @@ do_test trig_cd-1.3 {
}
} {0 {}}
do_test trig_cd-1.4 {
do_test trigger1-1.4 {
catchsql {
DROP TRIGGER tr1;
CREATE TRIGGER tr1 DELETE ON t1 BEGIN
@ -74,7 +74,7 @@ do_test trig_cd-1.4 {
}
} {0 {}}
do_test trig_cd-1.5 {
do_test trigger1-1.5 {
execsql {
BEGIN;
DROP TRIGGER tr2;
@ -83,13 +83,13 @@ do_test trig_cd-1.5 {
}
} {}
do_test trig_cd-1.6 {
do_test trigger1-1.6 {
catchsql {
DROP TRIGGER biggles;
}
} {1 {no such trigger: biggles}}
do_test trig_cd-1.7 {
do_test trigger1-1.7 {
catchsql {
DROP TABLE t1;
DROP TRIGGER tr1;
@ -99,7 +99,7 @@ do_test trig_cd-1.7 {
execsql {
CREATE TEMP TABLE temp_table(a);
}
do_test trig_cd-1.8 {
do_test trigger1-1.8 {
execsql {
CREATE TRIGGER temp_trig UPDATE ON temp_table BEGIN
SELECT * from sqlite_master;
@ -108,7 +108,7 @@ do_test trig_cd-1.8 {
}
} {0}
do_test trig_cd-1.9 {
do_test trigger1-1.9 {
catchsql {
CREATE TRIGGER tr1 AFTER UPDATE ON sqlite_master BEGIN
SELECT * FROM sqlite_master;
@ -120,7 +120,7 @@ do_test trig_cd-1.9 {
# a trigger does not mess up the DELETE that caused the trigger to
# run in the first place.
#
do_test trig_cd-1.10 {
do_test trigger1-1.10 {
execsql {
create table t1(a,b);
insert into t1 values(1,'a');
@ -135,7 +135,7 @@ do_test trig_cd-1.10 {
drop table t1;
}
} {2 b 4 d}
do_test trig_cd-1.11 {
do_test trigger1-1.11 {
execsql {
create table t1(a,b);
insert into t1 values(1,'a');
@ -152,7 +152,7 @@ do_test trig_cd-1.11 {
} {1 x-a 2 b 4 d}
# Ensure that we cannot create INSTEAD OF triggers on tables
do_test trig_cd-1.12 {
do_test trigger1-1.12 {
catchsql {
create table t1(a,b);
create trigger t1t instead of update on t1 for each row begin
@ -161,7 +161,7 @@ do_test trig_cd-1.12 {
}
} {1 {cannot create INSTEAD OF trigger on table: t1}}
# Ensure that we cannot create BEFORE triggers on views
do_test trig_cd-1.13 {
do_test trigger1-1.13 {
catchsql {
create view v1 as select * from t1;
create trigger v1t before update on v1 for each row begin
@ -170,7 +170,7 @@ do_test trig_cd-1.13 {
}
} {1 {cannot create BEFORE trigger on view: v1}}
# Ensure that we cannot create AFTER triggers on views
do_test trig_cd-1.14 {
do_test trigger1-1.14 {
catchsql {
create table t1(a,b);
create view v1 as select * from t1;

View File

@ -13,9 +13,9 @@
# These tests ensure that BEFORE and AFTER triggers are fired at the correct
# times relative to each other and the triggering statement.
#
# trig-1.1.*: ON UPDATE trigger execution model.
# trig-1.2.*: DELETE trigger execution model.
# trig-1.3.*: INSERT trigger execution model.
# trigger2-1.1.*: ON UPDATE trigger execution model.
# trigger2-1.2.*: DELETE trigger execution model.
# trigger2-1.3.*: INSERT trigger execution model.
#
# 2. Trigger program execution tests.
# These tests ensure that trigger programs execute correctly (ie. that a
@ -26,23 +26,23 @@
# This tests that conditional triggers (ie. UPDATE OF triggers and triggers
# with WHEN clauses) are fired only fired when they are supposed to be.
#
# trig-3.1: UPDATE OF triggers
# trig-3.2: WHEN clause
# trigger2-3.1: UPDATE OF triggers
# trigger2-3.2: WHEN clause
#
# 4. Cascaded trigger execution
# Tests that trigger-programs may cause other triggers to fire. Also that a
# trigger-program is never executed recursively.
#
# trig-4.1: Trivial cascading trigger
# trig-4.2: Trivial recursive trigger handling
# trigger2-4.1: Trivial cascading trigger
# trigger2-4.2: Trivial recursive trigger handling
#
# 5. Count changes behaviour.
# Verify that rows altered by triggers are not included in the return value
# of the "count changes" interface.
#
# 6. ON CONFLICT clause handling
# trig-6.1[a-f]: INSERT statements
# trig-6.2[a-f]: UPDATE statements
# trigger2-6.1[a-f]: INSERT statements
# trigger2-6.2[a-f]: UPDATE statements
#
# 7. Triggers on views fire correctly.
#
@ -102,7 +102,7 @@ foreach tbl_defn [ list \
END;
}
do_test trig-1.1.$ii {
do_test trigger2-1.1.$ii {
execsql {
UPDATE tbl SET a = a * 10, b = b * 10;
SELECT * FROM rlog ORDER BY idx;
@ -135,7 +135,7 @@ foreach tbl_defn [ list \
0, 0);
END;
}
do_test trig-1.2.$ii {
do_test trigger2-1.2.$ii {
execsql {
DELETE FROM tbl;
SELECT * FROM rlog;
@ -163,7 +163,7 @@ foreach tbl_defn [ list \
new.a, new.b);
END;
}
do_test trig-1.3.$ii {
do_test trigger2-1.3.$ii {
execsql {
CREATE TABLE other_tbl(a, b);
@ -277,7 +277,7 @@ foreach tr_program [ list \
execsql "DELETE FROM tbl; DELETE FROM log; $prep";
execsql "CREATE TRIGGER the_trigger BEFORE [string range $statement 0 6] ON tbl BEGIN $tr_program_fixed END;"
do_test trig-2-$ii-before "execsql {$statement $query}" $before_data
do_test trigger2-2-$ii-before "execsql {$statement $query}" $before_data
execsql "DROP TRIGGER the_trigger;"
execsql "DELETE FROM tbl; DELETE FROM log;"
@ -289,7 +289,7 @@ foreach tr_program [ list \
execsql "CREATE TRIGGER the_trigger AFTER [string range $statement 0 6] ON tbl BEGIN $tr_program_fixed END;"
do_test trig-2-$ii-after "execsql {$statement $query}" $after_data
do_test trigger2-2-$ii-after "execsql {$statement $query}" $after_data
execsql "DROP TRIGGER the_trigger;"
}
}
@ -300,7 +300,7 @@ catchsql {
# 3.
# trig-3.1: UPDATE OF triggers
# trigger2-3.1: UPDATE OF triggers
execsql {
CREATE TABLE tbl (a, b, c, d);
CREATE TABLE log (a);
@ -312,7 +312,7 @@ execsql {
UPDATE log SET a = a + 1;
END;
}
do_test trig-3.1 {
do_test trigger2-3.1 {
execsql {
UPDATE tbl SET b = 1, c = 10; -- 2
UPDATE tbl SET b = 10; -- 0
@ -326,7 +326,7 @@ execsql {
DROP TABLE log;
}
# trig-3.2: WHEN clause
# trigger2-3.2: WHEN clause
set when_triggers [ list \
{t1 BEFORE INSERT ON tbl WHEN new.a > 20} \
{t2 BEFORE INSERT ON tbl WHEN (SELECT count(*) FROM tbl) = 0} ]
@ -341,7 +341,7 @@ foreach trig $when_triggers {
execsql "CREATE TRIGGER $trig BEGIN UPDATE log set a = a + 1; END;"
}
do_test trig-3.2 {
do_test trigger2-3.2 {
execsql {
INSERT INTO tbl VALUES(0, 0, 0, 0); -- 1
@ -376,7 +376,7 @@ execsql {
INSERT INTO tblC values(new.a, new.b);
END;
}
do_test trig-4.1 {
do_test trigger2-4.1 {
execsql {
INSERT INTO tblA values(1, 2);
SELECT * FROM tblA;
@ -398,7 +398,7 @@ execsql {
INSERT INTO tbl VALUES (new.a, new.b, new.c);
END;
}
do_test trig-4.2 {
do_test trigger2-4.2 {
execsql {
INSERT INTO tbl VALUES (1, 2, 3);
select * from tbl;
@ -420,7 +420,7 @@ execsql {
DELETE FROM tbl;
END;
}
do_test trig-5 {
do_test trigger2-5 {
execsql {
INSERT INTO tbl VALUES(100, 200, 300);
}
@ -437,45 +437,45 @@ execsql {
INSERT OR IGNORE INTO tbl values (new.a, 0, 0);
END;
}
do_test trig-6.1a {
do_test trigger2-6.1a {
execsql {
BEGIN;
INSERT INTO tbl values (1, 2, 3);
SELECT * from tbl;
}
} {1 2 3}
do_test trig-6.1b {
do_test trigger2-6.1b {
catchsql {
INSERT OR ABORT INTO tbl values (2, 2, 3);
}
} {1 {constraint failed}}
do_test trig-6.1c {
do_test trigger2-6.1c {
execsql {
SELECT * from tbl;
}
} {1 2 3}
do_test trig-6.1d {
do_test trigger2-6.1d {
catchsql {
INSERT OR FAIL INTO tbl values (2, 2, 3);
}
} {1 {constraint failed}}
do_test trig-6.1e {
do_test trigger2-6.1e {
execsql {
SELECT * from tbl;
}
} {1 2 3 2 2 3}
do_test trig-6.1f {
do_test trigger2-6.1f {
execsql {
INSERT OR REPLACE INTO tbl values (2, 2, 3);
SELECT * from tbl;
}
} {1 2 3 2 0 0}
do_test trig-6.1g {
do_test trigger2-6.1g {
catchsql {
INSERT OR ROLLBACK INTO tbl values (3, 2, 3);
}
} {1 {constraint failed}}
do_test trig-6.1h {
do_test trigger2-6.1h {
execsql {
SELECT * from tbl;
}
@ -490,34 +490,34 @@ execsql {
UPDATE OR IGNORE tbl SET a = new.a, c = 10;
END;
}
do_test trig-6.2a {
do_test trigger2-6.2a {
execsql {
BEGIN;
UPDATE tbl SET a = 1 WHERE a = 4;
SELECT * from tbl;
}
} {1 2 10 6 3 4}
do_test trig-6.2b {
do_test trigger2-6.2b {
catchsql {
UPDATE OR ABORT tbl SET a = 4 WHERE a = 1;
}
} {1 {constraint failed}}
do_test trig-6.2c {
do_test trigger2-6.2c {
execsql {
SELECT * from tbl;
}
} {1 2 10 6 3 4}
do_test trig-6.2d {
do_test trigger2-6.2d {
catchsql {
UPDATE OR FAIL tbl SET a = 4 WHERE a = 1;
}
} {1 {constraint failed}}
do_test trig-6.2e {
do_test trigger2-6.2e {
execsql {
SELECT * from tbl;
}
} {4 2 10 6 3 4}
do_test trig-6.2f {
do_test trigger2-6.2f {
execsql {
UPDATE OR REPLACE tbl SET a = 1 WHERE a = 4;
SELECT * from tbl;
@ -526,12 +526,12 @@ do_test trig-6.2f {
execsql {
INSERT INTO tbl VALUES (2, 3, 4);
}
do_test trig-6.2g {
do_test trigger2-6.2g {
catchsql {
UPDATE OR ROLLBACK tbl SET a = 4 WHERE a = 1;
}
} {1 {constraint failed}}
do_test trig-6.2h {
do_test trigger2-6.2h {
execsql {
SELECT * from tbl;
}
@ -541,7 +541,7 @@ execsql {
}
# 7. Triggers on views
do_test trig-7.1 {
do_test trigger2-7.1 {
execsql {
CREATE TABLE ab(a, b);
CREATE TABLE cd(c, d);
@ -583,7 +583,7 @@ do_test trig-7.1 {
}
} {}
do_test trig-7.2 {
do_test trigger2-7.2 {
execsql {
UPDATE abcd SET a = 100, b = 5*5 WHERE a = 1;
DELETE FROM abcd WHERE a = 1;

View File

@ -29,7 +29,7 @@ execsql {
END;
}
# ABORT
do_test trig-raise-1.1 {
do_test trigger3-1.1 {
catchsql {
BEGIN;
INSERT INTO tbl VALUES (5, 5, 6);
@ -37,7 +37,7 @@ do_test trig-raise-1.1 {
}
} {1 {Trigger abort}}
do_test trig-raise-1.2 {
do_test trigger3-1.2 {
execsql {
SELECT * FROM tbl;
ROLLBACK;
@ -45,41 +45,41 @@ do_test trig-raise-1.2 {
} {5 5 6}
# FAIL
do_test trig-raise-2.1 {
do_test trigger3-2.1 {
catchsql {
BEGIN;
INSERT INTO tbl VALUES (5, 5, 6);
INSERT INTO tbl VALUES (2, 5, 6);
}
} {1 {Trigger fail}}
do_test trig-raise-2.2 {
do_test trigger3-2.2 {
execsql {
SELECT * FROM tbl;
ROLLBACK;
}
} {5 5 6 2 5 6}
# ROLLBACK
do_test trig-raise-3.1 {
do_test trigger3-3.1 {
catchsql {
BEGIN;
INSERT INTO tbl VALUES (5, 5, 6);
INSERT INTO tbl VALUES (3, 5, 6);
}
} {1 {Trigger rollback}}
do_test trig-raise-3.2 {
do_test trigger3-3.2 {
execsql {
SELECT * FROM tbl;
}
} {}
# IGNORE
do_test trig-raise-4.1 {
do_test trigger3-4.1 {
catchsql {
BEGIN;
INSERT INTO tbl VALUES (5, 5, 6);
INSERT INTO tbl VALUES (4, 5, 6);
}
} {0 {}}
do_test trig-raise-4.2 {
do_test trigger3-4.2 {
execsql {
SELECT * FROM tbl;
ROLLBACK;
@ -100,13 +100,13 @@ execsql {
SELECT CASE WHEN (old.a = 1) THEN RAISE(IGNORE) END;
END;
}
do_test trig-raise-5.1 {
do_test trigger3-5.1 {
execsql {
UPDATE tbl SET c = 10;
SELECT * FROM tbl;
}
} {1 2 3 4 5 10}
do_test trig-raise-5.2 {
do_test trigger3-5.2 {
execsql {
DELETE FROM tbl;
SELECT * FROM tbl;
@ -121,7 +121,7 @@ execsql {
INSERT INTO tbl2 VALUES (new.a, new.b, new.c);
END;
}
do_test trig-raise-6 {
do_test trigger3-6 {
execsql {
INSERT INTO tbl2 VALUES (1, 2, 3);
SELECT * FROM tbl2;
@ -139,17 +139,17 @@ execsql {
END;
}
do_test trig-raise-7.1 {
do_test trigger3-7.1 {
catchsql {
INSERT INTO tbl_view VALUES(1, 2, 3);
}
} {1 {View rollback}}
do_test trig-raise-7.2 {
do_test trigger3-7.2 {
catchsql {
INSERT INTO tbl_view VALUES(2, 2, 3);
}
} {0 {}}
do_test trig-raise-7.3 {
do_test trigger3-7.3 {
catchsql {
INSERT INTO tbl_view VALUES(3, 2, 3);
}