]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0329: tests: test_indent.vim leaves swapfiles behind master v9.2.0329
authorChristian Brabandt <cb@256bit.org>
Thu, 9 Apr 2026 21:30:19 +0000 (21:30 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 9 Apr 2026 21:30:19 +0000 (21:30 +0000)
Problem:  tests: test_indent.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_indent.vim
src/version.c

index 52d7be13901b970c8f29ec9d53a4a667a9e72c49..c3f7953caaa9a9223d7422ad54be4732a593b3e6 100644 (file)
@@ -29,7 +29,7 @@ func Test_preserveindent()
   call assert_equal("\t    \t    l", getline(1))
   set sw& et& pi&
 
-  close!
+  bw!
 endfunc
 
 " Test for indent()
@@ -42,7 +42,7 @@ func Test_indent_func()
   call assert_equal(4, indent(1))
   call setline(1, "    \t    abc")
   call assert_equal(12, indent(1))
-  close!
+  bw!
 endfunc
 
 " Test for reindenting a line using the '=' operator
@@ -56,7 +56,7 @@ func Test_reindent()
   call setline(1, ['foo', 'bar'])
   call feedkeys('ggVG=', 'xt')
   call assert_equal(['foo', 'bar'], getline(1, 2))
-  close!
+  bw!
 endfunc
 
 " Test indent operator creating one undo entry
@@ -103,7 +103,7 @@ func Test_preproc_indent()
   call assert_equal('#define FOO 1', getline(1))
   set cindent&
 
-  close!
+  bw!
 endfunc
 
 func Test_userlabel_indent()
@@ -116,7 +116,7 @@ func Test_userlabel_indent()
   normal GV=
   call assert_equal('läbél:', getline(2))
 
-  close!
+  bw!
 endfunc
 
 " Test that struct members are aligned
@@ -141,7 +141,7 @@ func Test_struct_indent()
   call setline(1, 'return (struct a) {')
   normal gg=G
   call assert_equal(getline(2), getline(3))
-  close!
+  bw!
 endfunc
 
 " Test for 'copyindent'
@@ -156,7 +156,7 @@ func Test_copyindent()
   call feedkeys("ol", 'xt')
   call assert_equal("    \t    l", getline(2))
   set sw& ai& et& ci&
-  close!
+  bw!
 endfunc
 
 " Test for changing multiple lines with lisp indent
@@ -166,7 +166,7 @@ func Test_lisp_indent_change_multiline()
   call setline(1, ['(if a', '  (if b', '    (return 5)))'])
   normal! jc2j(return 4))
   call assert_equal('  (return 4))', getline(2))
-  close!
+  bw!
 endfunc
 
 func Test_lisp_indent()
@@ -179,7 +179,7 @@ func Test_lisp_indent()
   normal! jostr1"
   normal! jostr2"
   call assert_equal(['  ;; comment', '  ;; comment', '  \ abc', '  \ abc', '', '  ;; ret', '  " str1\', '  str1"', '  " st\b', '  str2"'], getline(2, 11))
-  close!
+  bw!
 endfunc
 
 func Test_lisp_indent_quoted()
@@ -209,7 +209,7 @@ func Test_modeline_indent_expr()
   set modelineexpr&
   delfunc GetIndent
   let &modeline = modeline
-  close!
+  bw!
 endfunc
 
 func Test_indent_func_with_gq()
@@ -321,7 +321,7 @@ func Test_indent_overflow_count()
   norm! V2147483647>
   " indents by INT_MAX
   call assert_equal(2147483647, indent(1))
-  close!
+  bw!
 endfunc
 
 func Test_indent_overflow_count2()
@@ -335,7 +335,7 @@ func Test_indent_overflow_count2()
   call setline(1, "\tabc")
   norm! <<
   call assert_equal(0, indent(1))
-  close!
+  bw!
 endfunc
 
 " Test that mouse shape is restored to Normal mode after using "gq" when
index 14387f650eab049d5228142260b6639614ccdff9..c418648bbb89bc7785b9fd4cc668b770f5efe791 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    329,
 /**/
     328,
 /**/