From c8b768f1ea5851c5fa3727e31e0e5de3ffe81f37 Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Sun, 18 May 2025 12:43:11 -0300 Subject: [PATCH] add tests --- testing/all.test | 1 + testing/create_table.test | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 testing/create_table.test diff --git a/testing/all.test b/testing/all.test index b0ea003b6..1f9ab8051 100755 --- a/testing/all.test +++ b/testing/all.test @@ -33,3 +33,4 @@ source $testdir/default_value.test source $testdir/boolean.test source $testdir/literal.test source $testdir/null.test +source $testdir/create_table.test diff --git a/testing/create_table.test b/testing/create_table.test new file mode 100755 index 000000000..858914f38 --- /dev/null +++ b/testing/create_table.test @@ -0,0 +1,16 @@ +#!/usr/bin/env tclsh + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +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)); +} {}