summaryrefslogtreecommitdiffstats
path: root/ext/fts5/test/fts5porter2.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:28:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:28:19 +0000
commit18657a960e125336f704ea058e25c27bd3900dcb (patch)
tree17b438b680ed45a996d7b59951e6aa34023783f2 /ext/fts5/test/fts5porter2.test
parentInitial commit. (diff)
downloadsqlite3-18657a960e125336f704ea058e25c27bd3900dcb.tar.xz
sqlite3-18657a960e125336f704ea058e25c27bd3900dcb.zip
Adding upstream version 3.40.1.upstream/3.40.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/fts5/test/fts5porter2.test')
-rw-r--r--ext/fts5/test/fts5porter2.test69
1 files changed, 69 insertions, 0 deletions
diff --git a/ext/fts5/test/fts5porter2.test b/ext/fts5/test/fts5porter2.test
new file mode 100644
index 0000000..6e81b2d
--- /dev/null
+++ b/ext/fts5/test/fts5porter2.test
@@ -0,0 +1,69 @@
+# 2014 Dec 20
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+#
+# Tests focusing on the fts5 porter stemmer implementation.
+#
+# These are extra tests added to those in fts5porter.test in order to
+# improve test coverage of the porter stemmer implementation.
+#
+
+source [file join [file dirname [info script]] fts5_common.tcl]
+set testprefix fts5porter2
+
+# If SQLITE_ENABLE_FTS5 is defined, omit this file.
+ifcapable !fts5 {
+ finish_test
+ return
+}
+
+set test_vocab {
+ tion tion
+ ation ation
+ vation vation
+ avation avat
+ vion vion
+ ion ion
+ relational relat
+ relation relat
+ relate relat
+ zzz zzz
+ ii ii
+ iiing ii
+ xtional xtional
+ xenci xenci
+ xlogi xlogi
+ realization realiz
+ realize realiz
+ xization xizat
+ capitalism capit
+ talism talism
+ xiveness xive
+ xfulness xful
+ xousness xous
+ xical xical
+ xicate xicat
+ xicity xiciti
+ ies ie
+ eed e
+ eing e
+ s s
+}
+
+set i 0
+foreach {in out} $test_vocab {
+ do_test "1.$i.($in -> $out)" {
+ lindex [sqlite3_fts5_tokenize db porter $in] 0
+ } $out
+ incr i
+}
+
+
+finish_test