add phonetic and soundex

This commit is contained in:
danawan
2025-09-24 13:58:19 +07:00
parent c3132d0368
commit 815f0ffe25
5 changed files with 267 additions and 7 deletions

View File

@@ -581,6 +581,12 @@ def validate_fuzzy_jarowin(a):
def validate_fuzzy_osadist(a):
return a == "3"
def validate_fuzzy_soundex(a):
return a == "A250"
def validate_fuzzy_phonetic(a):
return a == "ABACAMA"
def test_fuzzy():
limbo = TestTursoShell()
ext_path = "./target/debug/liblimbo_fuzzy"
@@ -625,6 +631,11 @@ def test_fuzzy():
validate_fuzzy_osadist,
"fuzzy osadist function works",
)
limbo.run_test_fn(
"SELECT fuzzy_phonetic('awesome');",
validate_fuzzy_phonetic,
"fuzzy phonetic function works",
)
def test_vfs():
limbo = TestTursoShell()