blob: 391377bb3435f7c8177dd963d38a37649dcc9b5a [file] [log] [blame]
drh8ce10ba2003-06-22 01:41:49 +00001# 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
18set testdir [file dirname $argv0]
19source $testdir/tester.tcl
20
21# Test for ticket #360
22#
23do_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}