62c6819115
FossilOrigin-Name: 9818723ee127bc535e79f6876546cc027b4999e6
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
# Copyright (c) 1999, 2000 D. Richard Hipp
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2 of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public
|
|
# License along with this library; if not, write to the
|
|
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
# Boston, MA 02111-1307, USA.
|
|
#
|
|
# Author contact information:
|
|
# drh@hwaci.com
|
|
# http://www.hwaci.com/drh/
|
|
#
|
|
#***********************************************************************
|
|
# This file implements regression tests for SQLite library. The
|
|
# focus of this file is testing the DELETE FROM statement.
|
|
#
|
|
# $Id: delete.test,v 1.1 2000/05/30 00:51:27 drh Exp $
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
# Try to delete from a non-existant table.
|
|
#
|
|
do_test delete-1.1 {
|
|
set v [catch {execsql {DELETE FROM test1}} msg]
|
|
lappend v $msg
|
|
} {1 {no such table: test1}}
|
|
|
|
# Try to delete from sqlite_master
|
|
#
|
|
do_test delete-2.1 {
|
|
set v [catch {execsql {DELETE FROM sqlite_master}} msg]
|
|
lappend v $msg
|
|
} {1 {table "sqlite_master" may not be modified}}
|
|
|
|
|
|
|
|
finish_test
|