Debian Codegraph @

test/errofst1.test

raw
1 # 2024-11-20
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
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.
9 #
10 #***********************************************************************
11 #
12 # Test cases for sqlite3_error_offset()
13 #
14
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17
18 do_execsql_test errofst1-1.1 {
19 CREATE TABLE t1 as select 1 as aa;
20 CREATE VIEW t2 AS
21 WITH t3 AS (SELECT 1 FROM t1 AS bb, t1 AS cc WHERE cc.aa <= sts.aa)
22 SELECT 1 FROM t3 AS dd;
23 }
24 do_catchsql_test errofst1-1.2 {
25 SELECT * FROM t2;
26 } {1 {no such column: sts.aa}}
27 do_test errofst1-1.3 {
28 sqlite3_error_offset db
29 } {-1}
30
31 finish_test