Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/test/checkfault.test # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / test / checkfault.test` 41 lines ยท 1030 bytes Raw Blame History 1 # 2019 July 17 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 # 12 # This file contains fault-injection test cases for the 13 # sqlite3_db_cacheflush API. 14 # 15 16 set testdir [file dirname $argv0] 17 source $testdir/tester.tcl 18 set testprefix cffault 19 source $testdir/malloc_common.tcl 20 21 do_execsql_test 1.0 { 22 CREATE TABLE t1 (Col0 CHECK(1 COLLATE BINARY BETWEEN 1 AND 1) ) ; 23 CREATE TABLE t2(b, a CHECK( 24 CASE 'abc' COLLATE nocase WHEN a THEN 1 ELSE 0 END) 25 ); 26 } 27 28 do_faultsim_test 1.1 -faults oom* -body { 29 execsql { INSERT INTO t1 VALUES ('ABCDEFG') } 30 } -test { 31 faultsim_test_result {0 {}} 32 } 33 34 do_faultsim_test 1.2 -faults oom* -body { 35 execsql { INSERT INTO t2(a) VALUES('abc') } 36 } -test { 37 faultsim_test_result {0 {}} 38 } 39 40 41 finish_test