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 testing the WITH clause.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 set ::testprefix with3
24 # Test problems found by Kostya Serebryany using
25 # LibFuzzer. (http://llvm.org/docs/LibFuzzer.html)
27 do_catchsql_test 1.0 {
30 SELECT 5 FROM t0 UNION SELECT 8 FROM m
33 } {1 {no such table: m}}
35 # Additional test cases that came out of the work to
36 # fix for Kostya's problem.
43 SELECT * FROM x1 UNION ALL SELECT * FROM x2
58 x1(a) AS (values(100))
60 SELECT * FROM (WITH x2(y) AS (SELECT * FROM x1) SELECT y+a FROM x1, x2);