Minor test file modifications for builds compiled with OMIT options. (CVS 3077)

FossilOrigin-Name: c468aa349db4e6571711bf94781b88aa3c811d03
This commit is contained in:
danielk1977
2006-02-10 13:33:30 +00:00
parent ad2dccde5f
commit 12f5e2018d
6 changed files with 135 additions and 113 deletions
+96 -91
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this script testing the callback-free C/C++ API.
#
# $Id: capi2.test,v 1.30 2006/02/10 07:07:16 danielk1977 Exp $
# $Id: capi2.test,v 1.31 2006/02/10 13:33:31 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@@ -686,98 +686,103 @@ do_test capi2-11.2 {
do_test capi2-11.3 {
check_origins {SELECT col2 AS hello, col1 AS world FROM tab1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM tab1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.5 {
check_origins {SELECT (SELECT col2 FROM tab1), (SELECT col1 FROM tab1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM tab1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.7 {
check_origins {SELECT * FROM tab1}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-11.8 {
check_origins {SELECT * FROM (SELECT * FROM tab1)}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.1 {
execsql {
CREATE VIEW view1 AS SELECT * FROM tab1;
}
} {}
do_test capi2-12.2 {
check_origins {SELECT col2, col1 FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.3 {
check_origins {SELECT col2 AS hello, col1 AS world FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.5 {
check_origins {SELECT (SELECT col2 FROM view1), (SELECT col1 FROM view1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.7 {
check_origins {SELECT * FROM view1}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.8 {
check_origins {select * from (select * from view1)}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.9 {
check_origins {select * from (select * from (select * from view1))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.10 {
db close
sqlite3 db test.db
set ::DB [sqlite3_connection_pointer db]
check_origins {select * from (select * from (select * from view1))}
} [list {main tab1 col1} {main tab1 col2}]
ifcapable subquery {
do_test capi2-11.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM tab1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.5 {
check_origins {SELECT (SELECT col2 FROM tab1), (SELECT col1 FROM tab1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM tab1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-11.7 {
check_origins {SELECT * FROM tab1}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-11.8 {
check_origins {SELECT * FROM (SELECT * FROM tab1)}
} [list {main tab1 col1} {main tab1 col2}]
}
# This view will thwart the flattening optimization.
do_test capi2-13.1 {
execsql {
CREATE VIEW view2 AS SELECT * FROM tab1 limit 10 offset 10;
}
} {}
breakpoint
do_test capi2-13.2 {
check_origins {SELECT col2, col1 FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.3 {
check_origins {SELECT col2 AS hello, col1 AS world FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view2)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.5 {
check_origins {SELECT (SELECT col2 FROM view2), (SELECT col1 FROM view2)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.7 {
check_origins {SELECT * FROM view2}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.8 {
check_origins {select * from (select * from view2)}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.9 {
check_origins {select * from (select * from (select * from view2))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.10 {
db close
sqlite3 db test.db
set ::DB [sqlite3_connection_pointer db]
check_origins {select * from (select * from (select * from view2))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.11 {
check_origins {select * from (select * from tab1 limit 10 offset 10)}
} [list {main tab1 col1} {main tab1 col2}]
ifcapable view&&subquery {
do_test capi2-12.1 {
execsql {
CREATE VIEW view1 AS SELECT * FROM tab1;
}
} {}
do_test capi2-12.2 {
check_origins {SELECT col2, col1 FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.3 {
check_origins {SELECT col2 AS hello, col1 AS world FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.5 {
check_origins {SELECT (SELECT col2 FROM view1), (SELECT col1 FROM view1)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM view1}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-12.7 {
check_origins {SELECT * FROM view1}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.8 {
check_origins {select * from (select * from view1)}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.9 {
check_origins {select * from (select * from (select * from view1))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-12.10 {
db close
sqlite3 db test.db
set ::DB [sqlite3_connection_pointer db]
check_origins {select * from (select * from (select * from view1))}
} [list {main tab1 col1} {main tab1 col2}]
# This view will thwart the flattening optimization.
do_test capi2-13.1 {
execsql {
CREATE VIEW view2 AS SELECT * FROM tab1 limit 10 offset 10;
}
} {}
breakpoint
do_test capi2-13.2 {
check_origins {SELECT col2, col1 FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.3 {
check_origins {SELECT col2 AS hello, col1 AS world FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.4 {
check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view2)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.5 {
check_origins {SELECT (SELECT col2 FROM view2), (SELECT col1 FROM view2)}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.6 {
check_origins {SELECT (SELECT col2), (SELECT col1) FROM view2}
} [list {main tab1 col2} {main tab1 col1}]
do_test capi2-13.7 {
check_origins {SELECT * FROM view2}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.8 {
check_origins {select * from (select * from view2)}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.9 {
check_origins {select * from (select * from (select * from view2))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.10 {
db close
sqlite3 db test.db
set ::DB [sqlite3_connection_pointer db]
check_origins {select * from (select * from (select * from view2))}
} [list {main tab1 col1} {main tab1 col2}]
do_test capi2-13.11 {
check_origins {select * from (select * from tab1 limit 10 offset 10)}
} [list {main tab1 col1} {main tab1 col2}]
}
} ;# ifcapable columnmetadata