/ Check-in [50679889]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrections to test names to eliminate duplicates and follow naming conventions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 50679889c75cd3205253b1682abfbddc5ff09175
User & Date: mistachkin 2012-10-07 05:34:39
Context
2012-10-08
14:36
Manually define the Win32 file-mapping APIs for WAL if SQLITE_WIN32_FILEMAPPING_API is defined. check-in: 1c2c0a28 user: mistachkin tags: trunk
2012-10-07
14:14
Merge updates from trunk. check-in: bbb0d189 user: mistachkin tags: configReadOnly
05:34
Corrections to test names to eliminate duplicates and follow naming conventions. check-in: 50679889 user: mistachkin tags: trunk
2012-10-06
03:48
Changes for WinRT compatibility. Also, allow version resource compilation and embedding to be disabled at compile-time. check-in: 4b0facc1 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/shared9.test.

   166    166     db1 eval COMMIT
   167    167     db1 eval {
   168    168       BEGIN;
   169    169         INSERT INTO t1 VALUES(3, 4);
   170    170     }
   171    171   } {}
   172    172   
   173         -do_test 3.3 {
          173  +do_test 3.2 {
   174    174     set ::tf [launch_testfixture]
   175    175     testfixture $::tf {
   176    176       sqlite3 db test.db
   177    177       db eval {
   178    178         BEGIN;
   179    179           SELECT * FROM t1;
   180    180       }
   181    181     }
   182    182   } {1 2}
   183    183   
   184         -do_test 3.2 {
          184  +do_test 3.3 {
   185    185     db2 eval { SELECT * FROM t2 }
   186    186   } {1 2}
   187    187   
   188         -do_test 3.3 {
          188  +do_test 3.4 {
   189    189     list [catch { db1 eval COMMIT } msg] $msg
   190    190   } {1 {database is locked}}
   191    191   
   192    192   # At one point the following would fail, showing that the busy-handler
   193    193   # belonging to [db2] was invoked instead.
   194         -do_test 3.4 {
          194  +do_test 3.5 {
   195    195     set ::busyhandler_invoked_for
   196    196   } {db1}
   197         -do_test 3.5 {
          197  +do_test 3.6 {
   198    198     close $::tf
   199    199     db1 eval COMMIT
   200    200   } {}
   201    201     
   202    202   db1 close
   203    203   db2 close
   204    204   
   205    205   sqlite3_enable_shared_cache $::enable_shared_cache
   206    206   finish_test
   207    207   

Changes to test/trigger1.test.

     7      7   #
     8      8   #***********************************************************************
     9      9   #
    10     10   # This file tests creating and dropping triggers, and interaction thereof
    11     11   # with the database COMMIT/ROLLBACK logic.
    12     12   #
    13     13   # 1. CREATE and DROP TRIGGER tests
    14         -# trig-1.1: Error if table does not exist
    15         -# trig-1.2: Error if trigger already exists
    16         -# trig-1.3: Created triggers are deleted if the transaction is rolled back
    17         -# trig-1.4: DROP TRIGGER removes trigger
    18         -# trig-1.5: Dropped triggers are restored if the transaction is rolled back
    19         -# trig-1.6: Error if dropped trigger doesn't exist
    20         -# trig-1.7: Dropping the table automatically drops all triggers
    21         -# trig-1.8: A trigger created on a TEMP table is not inserted into sqlite_master
    22         -# trig-1.9: Ensure that we cannot create a trigger on sqlite_master
    23         -# trig-1.10:
    24         -# trig-1.11:
    25         -# trig-1.12: Ensure that INSTEAD OF triggers cannot be created on tables
    26         -# trig-1.13: Ensure that AFTER triggers cannot be created on views
    27         -# trig-1.14: Ensure that BEFORE triggers cannot be created on views
           14  +# trigger1-1.1: Error if table does not exist
           15  +# trigger1-1.2: Error if trigger already exists
           16  +# trigger1-1.3: Created triggers are deleted if the transaction is rolled back
           17  +# trigger1-1.4: DROP TRIGGER removes trigger
           18  +# trigger1-1.5: Dropped triggers are restored if the transaction is rolled back
           19  +# trigger1-1.6: Error if dropped trigger doesn't exist
           20  +# trigger1-1.7: Dropping the table automatically drops all triggers
           21  +# trigger1-1.8: A trigger created on a TEMP table is not inserted into sqlite_master
           22  +# trigger1-1.9: Ensure that we cannot create a trigger on sqlite_master
           23  +# trigger1-1.10:
           24  +# trigger1-1.11:
           25  +# trigger1-1.12: Ensure that INSTEAD OF triggers cannot be created on tables
           26  +# trigger1-1.13: Ensure that AFTER triggers cannot be created on views
           27  +# trigger1-1.14: Ensure that BEFORE triggers cannot be created on views
    28     28   #
    29     29   
    30     30   set testdir [file dirname $argv0]
    31     31   source $testdir/tester.tcl
    32     32   ifcapable !trigger||!compound {
    33     33     finish_test
    34     34     return
................................................................................
   261    261       }
   262    262       catchsql {
   263    263         CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
   264    264           INSERT INTO t2 VALUES(NEW.a,NEW.b);
   265    265         END;
   266    266       }
   267    267     } {0 {}}
   268         -  do_test trigger-3.2 {
          268  +  do_test trigger1-3.2 {
   269    269       catchsql {
   270    270         INSERT INTO t1 VALUES(1,2);
   271    271         SELECT * FROM t2;
   272    272       }
   273    273     } {1 {no such table: main.t2}}
   274         -  do_test trigger-3.3 {
          274  +  do_test trigger1-3.3 {
   275    275       db close
   276    276       set rc [catch {sqlite3 db test.db} err]
   277    277       if {$rc} {lappend rc $err}
   278    278       set rc
   279    279     } {0}
   280         -  do_test trigger-3.4 {
          280  +  do_test trigger1-3.4 {
   281    281       catchsql {
   282    282         INSERT INTO t1 VALUES(1,2);
   283    283         SELECT * FROM t2;
   284    284       }
   285    285     } {1 {no such table: main.t2}}
   286         -  do_test trigger-3.5 {
          286  +  do_test trigger1-3.5 {
   287    287       catchsql {
   288    288         CREATE TEMP TABLE t2(x,y);
   289    289         INSERT INTO t1 VALUES(1,2);
   290    290         SELECT * FROM t2;
   291    291       }
   292    292     } {1 {no such table: main.t2}}
   293         -  do_test trigger-3.6.1 {
          293  +  do_test trigger1-3.6.1 {
   294    294       catchsql {
   295    295         DROP TRIGGER r1;
   296    296         CREATE TEMP TRIGGER r1 AFTER INSERT ON t1 BEGIN
   297    297           INSERT INTO t2 VALUES(NEW.a,NEW.b), (NEW.b*100, NEW.a*100);
   298    298         END;
   299    299         INSERT INTO t1 VALUES(1,2);
   300    300         SELECT * FROM t2;
   301    301       }
   302    302     } {0 {1 2 200 100}}
   303         -  do_test trigger-3.6.2 {
          303  +  do_test trigger1-3.6.2 {
   304    304       catchsql {
   305    305         DROP TRIGGER r1;
   306    306         DELETE FROM t1;
   307    307         DELETE FROM t2;
   308    308         CREATE TEMP TRIGGER r1 AFTER INSERT ON t1 BEGIN
   309    309           INSERT INTO t2 VALUES(NEW.a,NEW.b);
   310    310         END;
   311    311         INSERT INTO t1 VALUES(1,2);
   312    312         SELECT * FROM t2;
   313    313       }
   314    314     } {0 {1 2}}
   315         -  do_test trigger-3.7 {
          315  +  do_test trigger1-3.7 {
   316    316       execsql {
   317    317         DROP TABLE t2;
   318    318         CREATE TABLE t2(x,y);
   319    319         SELECT * FROM t2;
   320    320       }
   321    321     } {}
   322    322   
   323         -  # There are two versions of trigger-3.8 and trigger-3.9. One that uses
          323  +  # There are two versions of trigger1-3.8 and trigger1-3.9. One that uses
   324    324     # compound SELECT statements, and another that does not.
   325    325     ifcapable compound {
   326    326     do_test trigger1-3.8 {
   327    327       execsql {
   328    328         INSERT INTO t1 VALUES(3,4);
   329    329         SELECT * FROM t1 UNION ALL SELECT * FROM t2;
   330    330       }
................................................................................
   442    442   } {3 4 7 8}
   443    443   do_test trigger1-6.8 {
   444    444     db close
   445    445     sqlite3 db test.db
   446    446     execsql {SELECT * FROM t2}
   447    447   } {3 4 7 8}
   448    448   
   449         -integrity_check trigger-7.1
          449  +integrity_check trigger1-7.1
   450    450   
   451    451   # Check to make sure the name of a trigger can be quoted so that keywords
   452    452   # can be used as trigger names.  Ticket #468
   453    453   #
   454    454   do_test trigger1-8.1 {
   455    455     execsql {
   456    456       CREATE TRIGGER 'trigger' AFTER INSERT ON t2 BEGIN SELECT 1; END;
................................................................................
   487    487       SELECT name FROM sqlite_master WHERE type='trigger';
   488    488     }
   489    489   } {}
   490    490   
   491    491   ifcapable conflict {
   492    492     # Make sure REPLACE works inside of triggers.
   493    493     #
   494         -  # There are two versions of trigger-9.1 and trigger-9.2. One that uses
          494  +  # There are two versions of trigger1-9.1 and trigger1-9.2. One that uses
   495    495     # compound SELECT statements, and another that does not.
   496    496     ifcapable compound {
   497    497       do_test trigger1-9.1 {
   498    498         execsql {
   499    499           CREATE TABLE t3(a,b);
   500    500           CREATE TABLE t4(x UNIQUE, b);
   501    501           CREATE TRIGGER r34 AFTER INSERT ON t3 BEGIN
................................................................................
   608    608       }
   609    609     } {}
   610    610     do_test trigger1-10.8 {
   611    611       execsql {
   612    612         SELECT * FROM insert_log;
   613    613       }
   614    614     } {main 11 12 13 temp 14 15 16 aux 17 18 19}
   615         -  do_test trigger1-10.8 {
          615  +  do_test trigger1-10.9 {
   616    616     # Drop and re-create the insert_log table in a different database. Note
   617    617     # that we can change the column names because the trigger programs don't
   618    618     # use them explicitly.
   619    619       execsql {
   620    620         DROP TABLE insert_log;
   621    621         CREATE TABLE aux.insert_log(db, d, e, f);
   622    622       }