Logo
Explore Help
Sign In
gvsafronov/futriix
1
0
Fork 0
You've already forked futriix
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
futriix/tests/unit/moduleapi/basics.tcl

14 lines
321 B
Tcl
Raw Normal View History

modules: Add newlen == 0 handling to RM_StringTruncate (#3717) (#3718) Previously, passing 0 for newlen would not truncate the string at all. This adds handling of this case, freeing the old string and creating a new empty string. Other changes: - Move `src/modules/testmodule.c` to `tests/modules/basics.c` - Introduce that basic test into the test suite - Add tests to cover StringTruncate - Add `test-modules` build target for the main makefile - Extend `distclean` build target to clean modules too (cherry picked from commit 1ccf2ca2f475a161b8ca0c574d4c0e6ef9ecf754)
2021-06-22 05:26:48 -04:00
set testmodule [file normalize tests/modules/basics.so]
# TEST.CTXFLAGS requires RDB to be disabled, so override save file
start_server {tags {"modules"} overrides {save ""}} {
r module load $testmodule
test {test module api basics} {
r test.basics
} {ALL TESTS PASSED}
r module unload test
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.4 Page: 651ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API