diff options
author | Evan <evan@neomantra.net> | 2021-06-22 05:26:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 12:26:48 +0300 |
commit | 1ccf2ca2f475a161b8ca0c574d4c0e6ef9ecf754 (patch) | |
tree | eccdbe7a6c14c2d0d35198d4bc51430e69086842 /runtest-moduleapi | |
parent | d0819d618e97c81ada5b09adffc127f332a4ce73 (diff) | |
download | redis-1ccf2ca2f475a161b8ca0c574d4c0e6ef9ecf754.tar.gz |
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
Diffstat (limited to 'runtest-moduleapi')
-rwxr-xr-x | runtest-moduleapi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtest-moduleapi b/runtest-moduleapi index a9b6e50c7..f9dbcce61 100755 --- a/runtest-moduleapi +++ b/runtest-moduleapi @@ -16,6 +16,7 @@ fi $MAKE -C tests/modules && \ $TCLSH tests/test_helper.tcl \ --single unit/moduleapi/commandfilter \ +--single unit/moduleapi/basics \ --single unit/moduleapi/fork \ --single unit/moduleapi/testrdb \ --single unit/moduleapi/infotest \ |