Problem: Test_spelldump_prefixtree_overflow() resets 'runtimepath' to
defaults, which can expose personal spell files to later tests
(Jun-ichi Takimoto, after v9.2.0662)
Solution: Save and restore the test runner's 'runtimepath' value (coyaSONG).
fixes: #20765
closes: #20766
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Signed-off-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
" tree_count_words() fix (9.2.0653).
func Test_spelldump_prefixtree_overflow()
CheckUnix
+ let save_rtp = &runtimepath
call mkdir('Xrtp/spell', 'pR')
" VIMspell + v50, SN_PREFCOND(prefixcnt=1), SN_END,
" LWORDTREE word "a" with affixID=1 (so dump_prefixes runs),
spelldump
call assert_true(line('$') > 1)
- set spell& spelllang& runtimepath&
+ set spell& spelllang&
+ let &runtimepath = save_rtp
bwipe!
bwipe!
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 783,
/**/
782,
/**/