]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0783: tests: personal spell files leak into later tests v9.2.0783
authorcoyaSONG <66289470+coyaSONG@users.noreply.github.com>
Fri, 17 Jul 2026 14:13:53 +0000 (14:13 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 17 Jul 2026 14:13:53 +0000 (14:13 +0000)
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>
src/testdir/test_spell.vim
src/version.c

index b524cf60fc0ee0c90e0ca26774b50367fa26e3a1..bd8185a09cc6b03c7cd7cf70789f7b3f32f79a25 100644 (file)
@@ -1591,6 +1591,7 @@ endfunc
 " 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),
@@ -1606,7 +1607,8 @@ func Test_spelldump_prefixtree_overflow()
   spelldump
   call assert_true(line('$') > 1)
 
-  set spell& spelllang& runtimepath&
+  set spell& spelllang&
+  let &runtimepath = save_rtp
   bwipe!
   bwipe!
 endfunc
index 4277e31e30a811c5e5d9db74ff72ffbf2e246ed8..e3b6bdf83637120511aa100125ca570dc2e03090 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    783,
 /**/
     782,
 /**/