interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / ext / recover / recoverbuild.test

42 lines · 1102 bytes Raw Blame History
1# 2023 February 28
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
13source [file join [file dirname [info script]] recover_common.tcl]
14set testprefix recoverbuild
15
16
17# The following tests verify that if the recovery extension is used with
18# a build that does not support the sqlite_dbpage table, the error message
19# is "no such table: sqlite_dbpage", and not something more generic.
20#
21reset_db
22create_null_module db sqlite_dbpage
23do_execsql_test 1.0 {
24 CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
25 INSERT INTO t1 VALUES(123, 'one hundred and twenty three');
26}
27
28forcedelete test.db2
29do_test 1.1 {
30 set R [sqlite3_recover_init db main test.db2]
31} {/sqlite_recover.*/}
32
33do_test 1.2 {
34 $R run
35} {1}
36
37do_test 1.3 {
38 list [catch { $R finish } msg] $msg
39} {1 {no such table: sqlite_dbpage}}
40
41finish_test
42