mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Modify test suite to work when SQLITE_OMIT_VIEW is defined. (CVS 2132)
FossilOrigin-Name: 711e8d7695dfc74b3f1ee00591dcdda2cd7fc7d5
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
# focus of this script is testing the ATTACH and DETACH commands
|
||||
# and related functionality.
|
||||
#
|
||||
# $Id: auth.test,v 1.21 2004/11/22 03:34:21 danielk1977 Exp $
|
||||
# $Id: auth.test,v 1.22 2004/11/22 08:43:32 danielk1977 Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@ -538,6 +538,9 @@ do_test auth-1.78 {
|
||||
execsql {SELECT name FROM sqlite_temp_master}
|
||||
} {t1}
|
||||
|
||||
# Test cases auth-1.79 to auth-1.123 test creating and dropping views.
|
||||
# Omit these if the library was compiled with views omitted.
|
||||
ifcapable view {
|
||||
do_test auth-1.79 {
|
||||
proc auth {code arg1 arg2 arg3 arg4} {
|
||||
if {$code=="SQLITE_CREATE_VIEW"} {
|
||||
@ -806,6 +809,7 @@ do_test auth-1.123 {
|
||||
do_test auth-1.124 {
|
||||
execsql {SELECT name FROM sqlite_temp_master}
|
||||
} {t1}
|
||||
} ;# ifcapable view
|
||||
|
||||
do_test auth-1.125 {
|
||||
proc auth {code arg1 arg2 arg3 arg4} {
|
||||
@ -1933,6 +1937,8 @@ do_test auth-4.1 {
|
||||
SQLITE_READ t2 b main r1 \
|
||||
SQLITE_READ t2 c main r1 \
|
||||
SQLITE_READ t2 c main r1]
|
||||
|
||||
ifcapable view {
|
||||
do_test auth-4.2 {
|
||||
execsql {
|
||||
CREATE VIEW v1 AS SELECT a+b AS x FROM t2;
|
||||
@ -1981,4 +1987,6 @@ do_test auth-4.5 {
|
||||
SQLITE_INSERT v1chng {} main r3 \
|
||||
SQLITE_READ v1 x main r3]
|
||||
|
||||
} ;# ifcapable view
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user