From 7bb481fda9ecb134804b49c2ce77ca28f7eea583 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 30 Mar 2012 20:42:12 -0400 Subject: Imported Upstream version 2.0.3 --- test/tkt3935.test | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 test/tkt3935.test (limited to 'test/tkt3935.test') diff --git a/test/tkt3935.test b/test/tkt3935.test new file mode 100644 index 0000000..abbeb3f --- /dev/null +++ b/test/tkt3935.test @@ -0,0 +1,57 @@ +# 2009 July 1 +# +# The author disclaims copyright to this source code. In place of +# a legal notice, here is a blessing: +# +# May you do good and not evil. +# May you find forgiveness for yourself and forgive others. +# May you share freely, never taking more than you give. +# +#*********************************************************************** +# This file implements regression tests for SQLite library. +# +# This file implements tests to verify that ticket #3935 has been fixed. +# +# $Id: tkt3935.test,v 1.2 2009/07/01 16:12:08 danielk1977 Exp $ + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_test tkt3935.1 { + execsql { + CREATE TABLE t1(a, b); + CREATE TABLE t2(c, d); + } +} {} + +do_test tkt3935.2 { + execsql { SELECT j1.b FROM ( SELECT * FROM t1 INNER JOIN t2 ON a=c ) AS j1 } +} {} +do_test tkt3935.3 { + execsql { SELECT j1.b FROM (t1 INNER JOIN t2 ON a=c) AS j1 } +} {} + + +do_test tkt3935.4 { + catchsql { SELECT a FROM (t1) AS t ON b USING(a) } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.5 { + catchsql { SELECT a FROM (t1) AS t ON b } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.6 { + catchsql { SELECT a FROM (SELECT * FROM t1) AS t ON b USING(a) } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.7 { + catchsql { SELECT a FROM (SELECT * FROM t1) AS t ON b } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.8 { + catchsql { SELECT a FROM t1 AS t ON b } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.9 { + catchsql { SELECT a FROM t1 AS t ON b USING(a) } +} {1 {a JOIN clause is required before ON}} +do_test tkt3935.10 { + catchsql { SELECT a FROM t1 AS t USING(a) } +} {1 {a JOIN clause is required before USING}} + +finish_test -- cgit v1.2.3