Hello The arrlen branch seems to faint. I had this idea of employing valgrind, to get certain about code in the branch. Currently I do this for myself, for my module, as follows: diff --git a/module/ValTest/runtests.zsh b/module/ValTest/runtests.zsh integer success failure skipped retval for file in "${(f)ZTST_testlist}"; do - $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file + if (( ${+commands[colour-valgrind]} )); then + colour-valgrind --leak-check=full $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file + else + valgrind --leak-check=full $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file + fi retval=$? Found 4 errors, instantly. The coloring may seem ridiculous, but the attached screenshot shows it is serious thing. It's like viewing data from XML, the data is logically divided, no need to parse with eyes. The python module colour-valgrind should be rewritten to Zsh. With extended-glob, I see no problems with this, although it's a piece of work. Next is the most important thing: known errors should be removed from output. Like the error from screenshot: array holding database-tied parameters should be left for OS to collect. Has anyone ideas of definition of an error, that could be used to remove blocks from valgrind output? Also I get multiple PIDs from valgrind. I now know that single Zsh instance is used for whole test file. So the multiple PIDs are weird, not sure from where they come from. Last thing, there should be much more test files. Single test per-file, I think. -- Sebastian Gniazdowski psprint /at/ zdharma.org
Attachment:
colovalg.png
Description: PNG image