OLD | NEW |
1 # 2005 August 18 | 1 # 2005 August 18 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
11 # This file implements regression tests for SQLite library. | 11 # This file implements regression tests for SQLite library. |
12 # | 12 # |
13 # This file implements tests to increase coverage of trigger.c. | 13 # This file implements tests to increase coverage of trigger.c. |
14 # | 14 # |
15 # $Id: trigger7.test,v 1.3 2008/08/11 18:44:58 drh Exp $ | 15 # $Id: trigger7.test,v 1.3 2008/08/11 18:44:58 drh Exp $ |
16 | 16 |
17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] |
18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl |
19 ifcapable {!trigger} { | 19 ifcapable {!trigger} { |
20 finish_test | 20 finish_test |
21 return | 21 return |
22 } | 22 } |
23 | 23 |
24 | |
25 # Error messages resulting from qualified trigger names. | 24 # Error messages resulting from qualified trigger names. |
26 # | 25 # |
27 do_test trigger7-1.1 { | 26 do_test trigger7-1.1 { |
28 execsql { | 27 execsql { |
29 CREATE TABLE t1(x, y); | 28 CREATE TABLE t1(x, y); |
30 } | 29 } |
31 catchsql { | 30 catchsql { |
32 CREATE TEMP TRIGGER main.r1 AFTER INSERT ON t1 BEGIN | 31 CREATE TEMP TRIGGER main.r1 AFTER INSERT ON t1 BEGIN |
33 SELECT 'no nothing'; | 32 SELECT 'no nothing'; |
34 END | 33 END |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 # in the series. | 106 # in the series. |
108 # | 107 # |
109 do_test trigger7-99.1 { | 108 do_test trigger7-99.1 { |
110 execsql { | 109 execsql { |
111 PRAGMA writable_schema=on; | 110 PRAGMA writable_schema=on; |
112 UPDATE sqlite_master SET sql='nonsense'; | 111 UPDATE sqlite_master SET sql='nonsense'; |
113 } | 112 } |
114 db close | 113 db close |
115 catch { sqlite3 db test.db } | 114 catch { sqlite3 db test.db } |
116 catchsql { DROP TRIGGER t2r5 } | 115 catchsql { DROP TRIGGER t2r5 } |
117 } {1 {malformed database schema (t2r12) - near "nonsense": syntax error}} | 116 } {1 {malformed database schema (t2r12)}} |
118 | 117 |
119 finish_test | 118 finish_test |
OLD | NEW |