3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is the ability to specify table and column names
15 # $Id: quote.test,v 1.4 2004/08/20 18:34:20 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 # Create a table with a strange name and with strange column names.
24 execsql {CREATE TABLE '@abc' ( '#xyz' int, '!pqr' text );}
29 # Insert, update and query the table.
33 execsql {INSERT INTO '@abc' VALUES(5,'hello')}
39 execsql {SELECT * FROM '@abc'}
45 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
51 SELECT '!pqr', '#xyz'+5 FROM '@abc'
56 SELECT "!pqr", "#xyz"+5 FROM '@abc'
61 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
67 execsql {UPDATE '@abc' SET '#xyz'=11}
73 execsql {SELECT '@abc'.'!pqr', '@abc'.'#xyz'+5 FROM '@abc'}
78 # Drop the table with the strange name.
82 execsql {DROP TABLE '@abc'}