mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-05 17:24:21 +01:00
Fix .schema
- Add tests for .schema - Make command line sql arguments to allow .commands
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
|
||||
source $testdir/cmdlineshell.test
|
||||
source $testdir/agg-functions.test
|
||||
source $testdir/coalesce.test
|
||||
source $testdir/join.test
|
||||
|
||||
28
testing/cmdlineshell.test
Normal file
28
testing/cmdlineshell.test
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env tclsh
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
do_execsql_test schema-1 {
|
||||
.schema users
|
||||
} {{CREATE TABLE users (
|
||||
id INTEGER PRIMARY KEY,
|
||||
first_name TEXT,
|
||||
last_name TEXT,
|
||||
email TEXT,
|
||||
phone_number TEXT,
|
||||
address TEXT,
|
||||
city TEXT,
|
||||
state TEXT,
|
||||
zipcode TEXT,
|
||||
age INTEGER
|
||||
);}}
|
||||
|
||||
do_execsql_test schema-2 {
|
||||
.schema products
|
||||
} {{CREATE TABLE products (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT,
|
||||
price REAL
|
||||
);}}
|
||||
|
||||
Reference in New Issue
Block a user