The setexpr.s command allows to concatenate two strings. According to the description in doc/usage/cmd/setexpr.rst the parameters value1 and value2 can be either direct values or pointers to a memory location holding the values.
Unfortunately `setexpr.s <value1> + <value2>` fails if any of the values is a direct value. $? is set to false. * Add support for direct values in setexpr.s. * Correct the unit test for "setexpr.s fred 0". * Add a new unit test for "setexpr.s fred '1' + '3'" giving '13'. * Remove invalid memory leak tests v3: remove invalid memory leak tests move an assignment v2: Update the commit message to indicate that a bug is corrected. Heinrich Schuchardt (4): test: clean up setexpr_test_str() test: remove available memory check in setexpr_test_str() test: remove available memory check in setexpr_test_str_oper() cmd/setexpr: support concatenation of direct strings cmd/setexpr.c | 54 ++++++++++++++++++++++++++++++++-------------- test/cmd/setexpr.c | 46 ++++++--------------------------------- 2 files changed, 45 insertions(+), 55 deletions(-) -- 2.47.1