Files
turso/testing/create_table.test
Jussi Saurio 022f679fab chore: make every CREATE TABLE stmt in entire repo have 1 space after tbl name
`BTreeTable::to_sql` makes us incompatible with SQLite by losing e.g. the original whitespace provided during the CREATE TABLE command.

For now let's fix our tests by regex-replacing every CREATE TABLE in
the entire repo to have exactly 1 space after the table name in the
CREATE TABLE statement.
2025-07-22 11:35:21 +03:00

19 lines
676 B
Tcl
Executable File

#!/usr/bin/env tclsh
set testdir [file dirname $argv0]
source $testdir/tester.tcl
if {[info exists ::env(SQLITE_EXEC)] && ($::env(SQLITE_EXEC) eq "scripts/limbo-sqlite3-index-experimental" || $::env(SQLITE_EXEC) eq "sqlite3")} {
do_execsql_test_in_memory_any_error create_table_one_unique_set {
CREATE TABLE t4 (a, unique(b));
}
do_execsql_test_on_specific_db {:memory:} create_table_same_uniques_and_primary_keys {
CREATE TABLE t2 (a,b, unique(a,b), primary key(a,b));
} {}
do_execsql_test_on_specific_db {:memory:} create_table_unique_contained_in_primary_keys {
CREATE TABLE t4 (a,b, primary key(a,b), unique(a));
} {}
}