xref: /sqlite-3.40.0/test/alterfault.test (revision bb0c5428)
1# 2021 November 16
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
14set testdir [file dirname $argv0]
15source $testdir/tester.tcl
16set testprefix alterfault
17
18do_execsql_test 1.0 {
19  CREATE TABLE t1(a);
20}
21faultsim_save_and_close
22
23do_faultsim_test 1.1 -faults oom* -prep {
24  faultsim_restore_and_reopen
25} -body {
26  execsql {
27    ALTER TABLE t1 ADD COLUMN b CHECK (a!=1)
28  }
29} -test {
30  faultsim_test_result {0 {}}
31}
32
33
34
35finish_test
36