drh | 8ce10ba | 2003-06-22 01:41:49 +0000 | [diff] [blame^] | 1 | # 2003 June 21 |
| 2 | # |
| 3 | # The author disclaims copyright to this source code. In place of |
| 4 | # a legal notice, here is a blessing: |
| 5 | # |
| 6 | # May you do good and not evil. |
| 7 | # May you find forgiveness for yourself and forgive others. |
| 8 | # May you share freely, never taking more than you give. |
| 9 | # |
| 10 | #*********************************************************************** |
| 11 | # This file implements regression tests for SQLite library. |
| 12 | # |
| 13 | # This file implements tests for miscellanous features that were |
| 14 | # left out of other test files. |
| 15 | # |
| 16 | # $Id: misc2.test,v 1.1 2003/06/22 01:41:50 drh Exp $ |
| 17 | |
| 18 | set testdir [file dirname $argv0] |
| 19 | source $testdir/tester.tcl |
| 20 | |
| 21 | # Test for ticket #360 |
| 22 | # |
| 23 | do_test misc2-1.1 { |
| 24 | catchsql { |
| 25 | CREATE TABLE FOO(bar integer); |
| 26 | CREATE TRIGGER foo_insert BEFORE INSERT ON foo BEGIN |
| 27 | SELECT CASE WHEN (NOT new.bar BETWEEN 0 AND 20) |
| 28 | THEN raise(rollback, 'aiieee') END; |
| 29 | END; |
| 30 | INSERT INTO foo(bar) VALUES (1); |
| 31 | } |
| 32 | } {1 aiieee} |