test/unit/functions.tcl: fix api version test

Makes the test pass for versions X.Y.Z and X.Y.Z-rQ

Fixes: https://codeberg.org/redict/redict/issues/34
Signed-off-by: Drew DeVault <sir@cmpwn.com>
This commit is contained in:
Drew DeVault 2024-03-28 11:09:24 +01:00
parent 1fb435754f
commit 3d8a3a9ba0

View File

@ -1126,7 +1126,10 @@ start_server {tags {"scripting"}} {
}
catch {[r fcall f1 0]} e
assert_equal [r fcall get_version_v1 0] [r fcall get_version_v2 0]
set v1 [r fcall get_version_v1 0]
set v2 [r fcall get_version_v2 0]
# X.Y.Z-rQ matches X.Y.Z
assert {$v1 eq $v2 || [string match "$v1-r*" $v2]}
}
test {FUNCTION - function stats} {