patch 9.1.2071: tests: test_ins_complete.vim leaves swapfiles behind

Commit: 
https://github.com/vim/vim/commit/0e0cb8520c02c2fa9efa25c8f2de30dd5c3655d3
Author: Christian Brabandt <[email protected]>
Date:   Fri Jan 9 17:06:54 2026 +0000

    patch 9.1.2071: tests: test_ins_complete.vim leaves swapfiles behind
    
    Problem:  tests: test_ins_complete.vim leaves swapfiles behind
    Solution: Close open buffers using :bw! instead of :close!
    
    closes: #19137
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_ins_complete.vim 
b/src/testdir/test_ins_complete.vim
index dcad25cfb..e40683e16 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -1022,13 +1022,13 @@ func Test_completefunc_error()
   %d
   set complete=F
   call assert_fails('exe "normal a\<C-N>"', 'E565:')
-  close!
+  bw!
 
   set completefunc& complete&
   delfunc CompleteFunc
   delfunc CompleteFunc2
   delfunc CompleteFunc3
-  close!
+  bw!
 endfunc
 
 " Test for returning non-string values from 'completefunc'
@@ -1226,7 +1226,7 @@ func Test_complete_wrapscan()
   setlocal complete=w
   call feedkeys("itw\<C-N>\<C-X>\<C-N>\<C-X>\<C-N>\<C-X>\<C-N>", 'xt')
   call assert_equal('two three four', getline(1))
-  close!
+  bw!
   " complete words from the current buffer
   setlocal complete=.
   %d
@@ -1234,7 +1234,7 @@ func Test_complete_wrapscan()
   call cursor(2, 1)
   call feedkeys("ion\<C-N>\<C-X>\<C-N>\<C-X>\<C-N>\<C-X>\<C-N>", 'xt')
   call assert_equal('one two one two', getline(2))
-  close!
+  bw!
 endfunc
 
 " Test for completing special characters
@@ -1243,7 +1243,7 @@ func Test_complete_special_chars()
   call setline(1, 'int .*[-\^$ func float')
   call feedkeys("oin\<C-X>\<C-P>\<C-X>\<C-P>\<C-X>\<C-P>", 'xt')
   call assert_equal('int .*[-\^$ func float', getline(2))
-  close!
+  bw!
 endfunc
 
 " Test for completion when text is wrapped across lines.
@@ -1253,7 +1253,7 @@ func Test_complete_across_line()
   setlocal textwidth=20
   exe "normal 2G$a re\<C-X>\<C-P>\<C-X>\<C-P>\<C-X>\<C-P>\<C-X>\<C-P>"
   call assert_equal(['one two three red', 'green blue one'], getline(2, '$'))
-  close!
+  bw!
 endfunc
 
 " Test for completing words with a '.' at the end of a word.
@@ -1284,7 +1284,7 @@ func Test_complete_add_onechar()
   exe "normal aWOR\<C-P>\<bs>\<bs>\<bs>\<bs>\<bs>\<bs>\<C-L>\<C-L>\<C-L>"
   call assert_equal('workh', getline(3))
   set ignorecase& backspace&
-  close!
+  bw!
 endfunc
 
 " Test for using CTRL-X CTRL-L to complete whole lines lines
@@ -1350,7 +1350,7 @@ func Test_complete_with_cindent()
   setlocal cinkeys+==while
   exe "normal Giwh\<C-P> "
   call assert_equal("  while ", getline('$'))
-  close!
+  bw!
 endfunc
 
 " Test for <CTRL-X> <CTRL-V> completion. Complete commands and functions
@@ -1373,7 +1373,7 @@ func Test_complete_cmdline()
   call delete('TestCommand2Test')
   delcom TestCommand1
   delcom TestCommand2
-  close!
+  bw!
 endfunc
 
 " Test for <CTRL-X> <CTRL-Z> stopping completion without changing the match
@@ -1422,7 +1422,7 @@ func Test_complete_stop()
   iunmap <F2>
   delfunc Save_mode1
   delfunc Save_mode2
-  close!
+  bw!
 endfunc
 
 " Test for typing CTRL-R in insert completion mode to insert a register
@@ -1497,7 +1497,7 @@ func Test_complete_from_unloadedbuf()
   call writefile(['def'], "Xfile2", 'D')
   edit Xfile1
   edit Xfile2
-  new | close
+  new | bw
   enew
   bunload Xfile1 Xfile2
   set complete=u
@@ -1535,7 +1535,7 @@ func Test_complete_from_unlistedbuf()
   call writefile(['def'], "Xfile2", 'D')
   edit Xfile1
   edit Xfile2
-  new | close
+  new | bw
   bdel Xfile1 Xfile2
   set complete=U
   " complete from an unlisted buffer
diff --git a/src/version.c b/src/version.c
index 6a94b422a..f24b8c2fc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2071,
 /**/
     2070,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1veG4n-004b8U-1c%40256bit.org.

Raspunde prin e-mail lui