1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Have tests pass when SQLITE_OMIT_SCHEMA_PRAGMAS is defined. (CVS 2144)

FossilOrigin-Name: 6ccb589bd94fc7d33e07caa39e011c3628563e9b
This commit is contained in:
danielk1977
2004-11-23 10:13:03 +00:00
parent ae82558bd0
commit 27188fb5f0
7 changed files with 45 additions and 20 deletions

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: auth.test,v 1.23 2004/11/22 11:51:14 danielk1977 Exp $
# $Id: auth.test,v 1.24 2004/11/23 10:13:03 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@ -1654,9 +1654,11 @@ do_test auth-1.259 {
DETACH DATABASE test1;
}
} {0 {}}
ifcapable schema_pragmas {
do_test auth-1.260 {
lindex [execsql {PRAGMA database_list}] 7
} {test1}
} ;# ifcapable schema_pragmas
do_test auth-1.261 {
proc auth {code arg1 arg2 arg3 arg4} {
if {$code=="SQLITE_DETACH"} {
@ -1669,9 +1671,11 @@ do_test auth-1.261 {
DETACH DATABASE test1;
}
} {1 {not authorized}}
ifcapable schema_pragmas {
do_test auth-1.262 {
lindex [execsql {PRAGMA database_list}] 7
} {test1}
} ;# ifcapable schema_pragmas
db authorizer {}
execsql {DETACH DATABASE test1}
db authorizer ::auth