aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/alter3.test2
-rw-r--r--test/alter4.test2
-rw-r--r--test/analyze3.test2
-rw-r--r--test/collate1.test2
-rw-r--r--test/collateB.test2
-rw-r--r--test/colmeta.test2
-rw-r--r--test/dbfuzz.c2
-rw-r--r--test/enc2.test2
-rw-r--r--test/fts3cov.test4
-rw-r--r--test/fts3expr2.test2
-rw-r--r--test/fts4langid.test2
-rw-r--r--test/func9.test12
-rw-r--r--test/fuzz.test2
-rw-r--r--test/fuzzcheck.c2
-rw-r--r--test/in4.test2
-rw-r--r--test/indexedby.test2
-rw-r--r--test/recover.test3
-rw-r--r--test/shared.test2
-rw-r--r--test/tabfunc01.test13
-rw-r--r--test/tableapi.test2
-rw-r--r--test/tester.tcl2
-rwxr-xr-xtest/testrunner.tcl9
-rw-r--r--test/testrunner_data.tcl14
-rw-r--r--test/walsetlk.test1
24 files changed, 65 insertions, 25 deletions
diff --git a/test/alter3.test b/test/alter3.test
index c6f26b0c5..464e20aee 100644
--- a/test/alter3.test
+++ b/test/alter3.test
@@ -101,7 +101,7 @@ do_test alter3-1.7 {
} {{CREATE TABLE t3(a, b, c VARCHAR(10, 20), UNIQUE(a, b))}}
do_test alter3-1.99 {
catchsql {
- # May not exist if foriegn-keys are omitted at compile time.
+ # May not exist if foreign-keys are omitted at compile time.
DROP TABLE t2;
}
execsql {
diff --git a/test/alter4.test b/test/alter4.test
index c63ba6b07..f6ada8f3f 100644
--- a/test/alter4.test
+++ b/test/alter4.test
@@ -110,7 +110,7 @@ do_test alter4-1.7 {
} {{CREATE TABLE t3(a, b, c VARCHAR(10, 20), UNIQUE(a, b))}}
do_test alter4-1.99 {
catchsql {
- # May not exist if foriegn-keys are omitted at compile time.
+ # May not exist if foreign-keys are omitted at compile time.
DROP TABLE t2;
}
execsql {
diff --git a/test/analyze3.test b/test/analyze3.test
index c5d7a7cb1..033dfa5df 100644
--- a/test/analyze3.test
+++ b/test/analyze3.test
@@ -48,7 +48,7 @@ if {[permutation]=="prepare"} {
# query plan when there is no way in which replanning the
# query may produce a superior outcome.
#
-# analyze3-4.*: Test that SQL or authorization callback errors occuring
+# analyze3-4.*: Test that SQL or authorization callback errors occurring
# within sqlite3Reprepare() are handled correctly.
#
# analyze3-5.*: Check that the query plans of applicable statements are
diff --git a/test/collate1.test b/test/collate1.test
index b65b85047..da662bee6 100644
--- a/test/collate1.test
+++ b/test/collate1.test
@@ -23,7 +23,7 @@ set testprefix collate1
# collate1-1.* - Single-field ORDER BY with an explicit COLLATE clause.
# collate1-2.* - Multi-field ORDER BY with an explicit COLLATE clause.
# collate1-3.* - ORDER BY using a default collation type. Also that an
-# explict collate type overrides a default collate type.
+# explicit collate type overrides a default collate type.
# collate1-4.* - ORDER BY using a data type.
#
diff --git a/test/collateB.test b/test/collateB.test
index 3c8d50d8e..678eb5af0 100644
--- a/test/collateB.test
+++ b/test/collateB.test
@@ -62,7 +62,7 @@ do_execsql_test collateB-1.17 {
} {1 11 1 11 |}
#-------------------------------------------------------------------------
-# Test an assert() failure that was occuring if an index were created
+# Test an assert() failure that was occurring if an index were created
# on a column explicitly declared "COLLATE binary".
reset_db
do_execsql_test 2.1 {
diff --git a/test/colmeta.test b/test/colmeta.test
index 21b0e0f38..43d2c83cb 100644
--- a/test/colmeta.test
+++ b/test/colmeta.test
@@ -97,7 +97,7 @@ foreach {tn params results} $tests {
}
# Calling sqlite3_table_column_metadata with a NULL column name merely
-# checks for the existance of the table.
+# checks for the existence of the table.
#
do_test colmeta-300 {
catch {sqlite3_table_column_metadata $::DB main xyzzy} res
diff --git a/test/dbfuzz.c b/test/dbfuzz.c
index ca1c6ea21..1587bacbb 100644
--- a/test/dbfuzz.c
+++ b/test/dbfuzz.c
@@ -368,7 +368,7 @@ static int inmemDelete(
return SQLITE_IOERR_DELETE;
}
-/* Check for the existance of a file
+/* Check for the existence of a file
*/
static int inmemAccess(
sqlite3_vfs *pVfs,
diff --git a/test/enc2.test b/test/enc2.test
index 81e7bfd68..f7446a40e 100644
--- a/test/enc2.test
+++ b/test/enc2.test
@@ -63,7 +63,7 @@ set dbcontents {
INSERT INTO t1 VALUES('one', 'I', 1);
}
# This proc tests that we can open and manipulate the test.db
-# database, and that it is possible to retreive values in
+# database, and that it is possible to retrieve values in
# various text encodings.
#
proc run_test_script {t enc} {
diff --git a/test/fts3cov.test b/test/fts3cov.test
index 5d8383657..d01791bbe 100644
--- a/test/fts3cov.test
+++ b/test/fts3cov.test
@@ -25,7 +25,7 @@ set testprefix fts3cov
# When it first needs to read a block from the %_segments table, the FTS3
# module compiles an SQL statement for that purpose. The statement is
# stored and reused each subsequent time a block is read. This test case
-# tests the effects of an OOM error occuring while compiling the statement.
+# tests the effects of an OOM error occurring while compiling the statement.
#
# Similarly, when FTS3 first needs to scan through a set of segment leaves
# to find a set of documents that matches a term, it allocates a string
@@ -277,7 +277,7 @@ do_test fts3cov-7.2 {
# pending-terms table must be flushed each time a document with a docid
# less than or equal to the previous docid is modified.
#
-# This test checks the effects of an OOM error occuring when the
+# This test checks the effects of an OOM error occurring when the
# pending-terms table is flushed for this reason as part of a DELETE
# statement.
#
diff --git a/test/fts3expr2.test b/test/fts3expr2.test
index c3d161730..6fb133f17 100644
--- a/test/fts3expr2.test
+++ b/test/fts3expr2.test
@@ -46,7 +46,7 @@ ifcapable !fts3 {
# * Whether or not superflous parenthesis are included. i.e. if
# "a OR b AND (c OR d)" or "a OR (b AND (c OR d))" is generated.
#
-# * Whether or not explict AND operators are used. i.e. if
+# * Whether or not explicit AND operators are used. i.e. if
# "a OR b AND c" or "a OR b c" is generated.
#
diff --git a/test/fts4langid.test b/test/fts4langid.test
index 7be594bd5..84424ff3c 100644
--- a/test/fts4langid.test
+++ b/test/fts4langid.test
@@ -435,7 +435,7 @@ do_test 5.3.2 {
for {set i 0} {$i < 20} {incr i} {
execsql {
INSERT INTO t6(content, lid) VALUES(
- 'I (row '||$i||') belong to langauge N!', $lid
+ 'I (row '||$i||') belong to language N!', $lid
);
}
}
diff --git a/test/func9.test b/test/func9.test
index 6cf9fc31e..42138ab2e 100644
--- a/test/func9.test
+++ b/test/func9.test
@@ -9,7 +9,7 @@
#
#*************************************************************************
#
-# Test cases for SQL newer functions
+# Test cases for some newer SQL functions
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -36,5 +36,15 @@ do_catchsql_test func9-160 {
SELECT concat_ws(',');
} {1 {wrong number of arguments to function concat_ws()}}
+# https://sqlite.org/forum/forumpost/4c344ca61f (2025-03-02)
+do_execsql_test func9-200 {
+ SELECT unistr('G\u00e4ste');
+} {Gäste}
+do_execsql_test func9-210 {
+ SELECT unistr_quote(unistr('G\u00e4ste'));
+} {'Gäste'}
+do_execsql_test func9-220 {
+ SELECT format('%#Q',unistr('G\u00e4ste'));
+} {'Gäste'}
finish_test
diff --git a/test/fuzz.test b/test/fuzz.test
index 83dc79bc7..7002054be 100644
--- a/test/fuzz.test
+++ b/test/fuzz.test
@@ -130,7 +130,7 @@ do_test fuzz-1.12.1 {
# The following query was crashing. The later subquery (in the FROM)
# clause was flattened into the parent, but the code was not repairng
# the "b" reference in the other sub-query. When the query was executed,
- # that "b" refered to a non-existant vdbe table-cursor.
+ # that "b" referred to a non-existant vdbe table-cursor.
#
execsql {
SELECT 1 IN ( SELECT b UNION SELECT 1 ) FROM (SELECT b FROM abc);
diff --git a/test/fuzzcheck.c b/test/fuzzcheck.c
index 84e3f3289..140ad6944 100644
--- a/test/fuzzcheck.c
+++ b/test/fuzzcheck.c
@@ -1594,7 +1594,7 @@ static int inmemDelete(
return SQLITE_IOERR_DELETE;
}
-/* Check for the existance of a file
+/* Check for the existence of a file
*/
static int inmemAccess(
sqlite3_vfs *pVfs,
diff --git a/test/in4.test b/test/in4.test
index 71993e700..07cd3e284 100644
--- a/test/in4.test
+++ b/test/in4.test
@@ -442,7 +442,7 @@ do_execsql_test 10.0 {
} {10}
# 2021-06-13 dbsqlfuzz e41762333a4d6e90a49e628f488d0873b2dba4c5
-# The opcode that preceeds OP_SeekScan is usually OP_IdxGT, but can
+# The opcode that precedes OP_SeekScan is usually OP_IdxGT, but can
# sometimes be OP_IdxGE
#
reset_db
diff --git a/test/indexedby.test b/test/indexedby.test
index 6a371112b..de4bdaf18 100644
--- a/test/indexedby.test
+++ b/test/indexedby.test
@@ -187,7 +187,7 @@ do_test indexedby-4.4 {
} {0 {}}
# Test embedding an INDEXED BY in a CREATE VIEW statement. This block
-# also tests that nothing bad happens if an index refered to by
+# also tests that nothing bad happens if an index referred to by
# a CREATE VIEW statement is dropped and recreated.
#
do_execsql_test indexedby-5.1 {
diff --git a/test/recover.test b/test/recover.test
index 268d3a55b..ad6b7298d 100644
--- a/test/recover.test
+++ b/test/recover.test
@@ -47,6 +47,9 @@ proc recover_with_opts {opts} {
set sql [read $fd]
close $fd
+ # Remove the ".dbconfig defensive off" line
+ set sql [string map {".dbconfig defensive off" ""} $sql]
+
forcedelete test.db2
sqlite3 db2 test.db2
execsql $sql db2
diff --git a/test/shared.test b/test/shared.test
index a0cd0a669..146830e56 100644
--- a/test/shared.test
+++ b/test/shared.test
@@ -312,7 +312,7 @@ do_test shared-$av.4.1.3 {
} {2}
# Sanity check: Create a table in ./test.db via handle db, and test that handle
-# db2 can "see" the new table immediately. A handle using a seperate pager
+# db2 can "see" the new table immediately. A handle using a separate pager
# cache would have to reload the database schema before this were possible.
#
do_test shared-$av.4.2.1 {
diff --git a/test/tabfunc01.test b/test/tabfunc01.test
index b6797171e..cbf9865ed 100644
--- a/test/tabfunc01.test
+++ b/test/tabfunc01.test
@@ -181,6 +181,19 @@ do_execsql_test tabfunc01-4.4 {
SELECT * FROM (generate_series(1,5,2)) AS x LIMIT 10;
} {1 3 5}
+# 2025-03-13 forum post bf2dc8e909983511
+#
+do_execsql_test tabfunc01-5.1 {
+ SELECT value
+ FROM generate_series(60,73,6)
+ WHERE value=66;
+} 66
+do_execsql_test tabfunc01-5.2 {
+ SELECT value
+ FROM generate_series(73,60,-6)
+ WHERE value=67;
+} 67
+
# The next series of tests is verifying that virtual table are able
# to optimize the IN operator, even on terms that are not marked "omit".
# When the generate_series virtual table is compiled for the testfixture,
diff --git a/test/tableapi.test b/test/tableapi.test
index 02633cdca..772073747 100644
--- a/test/tableapi.test
+++ b/test/tableapi.test
@@ -230,7 +230,7 @@ ifcapable schema_pragmas {
}
# do_malloc_test closes and deletes the usual db connections and files on
-# each iteration. $::dbx is a seperate connection, and on Windows, will
+# each iteration. $::dbx is a separate connection, and on Windows, will
# cause the file deletion of test.db to fail, so we move the close of $::dbx
# up to here before the do_malloc_test.
do_test tableapi-99.0 {
diff --git a/test/tester.tcl b/test/tester.tcl
index 079255761..66d9aeae3 100644
--- a/test/tester.tcl
+++ b/test/tester.tcl
@@ -1724,7 +1724,7 @@ proc ifcapable {expr code {else ""} {elsecode ""}} {
return -code $c $r
}
-# This proc execs a seperate process that crashes midway through executing
+# This proc execs a separate process that crashes midway through executing
# the SQL script $sql on database test.db.
#
# The crash occurs during a sync() of file $crashfile. When the crash
diff --git a/test/testrunner.tcl b/test/testrunner.tcl
index d365092e0..6ff414c4b 100755
--- a/test/testrunner.tcl
+++ b/test/testrunner.tcl
@@ -30,8 +30,8 @@ proc find_interpreter {} {
&& [file executable ./testfixture]
} {
puts "Failed to find tcl package sqlite3. Restarting with ./testfixture.."
- set status [catch {
- exec ./testfixture [info script] {*}$::argv >@ stdout
+ set status [catch {
+ exec [trd_get_bin_name testfixture] [info script] {*}$::argv >@ stdout
} msg]
exit $status
}
@@ -237,7 +237,7 @@ switch -nocase -glob -- $tcl_platform(os) {
set TRG(run) run.sh
set TRG(runcmd) "bash run.sh"
}
- *linux* {
+ *linux* - MSYS_NT* - MINGW64_NT* - MINGW32_NT* {
set TRG(platform) linux
set TRG(make) make.sh
set TRG(makecmd) "bash make.sh"
@@ -265,9 +265,10 @@ switch -nocase -glob -- $tcl_platform(os) {
set TRG(runcmd) "run.bat"
}
default {
+ puts "tcl_platform(os)=$::tcl_platform(os)"
error "cannot determine platform!"
}
-}
+}
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
diff --git a/test/testrunner_data.tcl b/test/testrunner_data.tcl
index 4685dabf5..2597cbe47 100644
--- a/test/testrunner_data.tcl
+++ b/test/testrunner_data.tcl
@@ -459,7 +459,7 @@ proc trd_fuzztest_data {} {
return [list fuzzcheck.exe $lFuzzDb]
}
- return [list fuzzcheck $lFuzzDb {sessionfuzz run} $lSessionDb]
+ return [list [trd_get_bin_name fuzzcheck] $lFuzzDb {sessionfuzz run} $lSessionDb]
}
@@ -688,3 +688,15 @@ proc trd_test_script_properties {path} {
set trd_test_script_properties_cache($path)
}
+
+# Usage:
+#
+# trd_get_bin_name executable-file-name
+#
+# If the tcl platform is "unix", return $bin, else return
+# ${bin}.exe.
+proc trd_get_bin_name {bin} {
+ global tcl_platform
+ if {"unix" eq $tcl_platform(platform)} {return $bin}
+ return $bin.exe
+}
diff --git a/test/walsetlk.test b/test/walsetlk.test
index d3fd050a6..b65eb9ab6 100644
--- a/test/walsetlk.test
+++ b/test/walsetlk.test
@@ -315,6 +315,7 @@ testfixture_nb done {
db eval {
COMMIT
}
+ db close
}
after 500 {set ok 1}