2 #pragma ident "%Z%%M% %I% %E% SMI"
6 # The author disclaims copyright to this source code. In place of
7 # a legal notice, here is a blessing:
9 # May you do good and not evil.
10 # May you find forgiveness for yourself and forgive others.
11 # May you share freely, never taking more than you give.
13 #***********************************************************************
14 # This file implements regression tests for SQLite library. The
15 # focus of this file is the ability to specify table and column names
18 # $Id: quote.test,v 1.3 2002/05/21 13:43:04 drh Exp $
20 set testdir [file dirname $argv0]
21 source $testdir/tester.tcl
23 # Create a table with a strange name and with strange column names.
27 execsql {CREATE TABLE '@abc' ( '#xyz' int, '!pqr' text );}
32 # Insert, update and query the table.
36 execsql {INSERT INTO '@abc' VALUES(5,'hello')}
42 execsql {SELECT * FROM '@abc'}
48 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
54 SELECT '!pqr', '#xyz'+5 FROM '@abc'
59 SELECT "!pqr", "#xyz"+5 FROM '@abc'
64 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
70 execsql {UPDATE '@abc' SET '#xyz'=11}
76 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
81 # Drop the table with the strange name.
85 execsql {DROP TABLE '@abc'}