Skip to content

Commit a2bb21a

Browse files
committed
patch 9.1.1613: tests: test_search leaves a few swapfiles behind
Problem: tests: test_search leaves a few swapfiles behind Solution: Use :bw! instead of :close to close the swapfile at the end of the test. related: #17933 Signed-off-by: Christian Brabandt <[email protected]>
1 parent c03990d commit a2bb21a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/testdir/test_search.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ func Test_search_match_at_curpos()
16231623
call search('.', 'c')
16241624
call assert_equal([3, 5], [line('.'), col('.')])
16251625

1626-
close!
1626+
bw!
16271627
endfunc
16281628

16291629
" Test for error cases with the search() function
@@ -1836,7 +1836,7 @@ func Test_search_pat_not_found()
18361836
call assert_fails('normal n', 'E385:')
18371837
call assert_fails('normal N', 'E384:')
18381838
set wrapscan&
1839-
close
1839+
bw
18401840
endfunc
18411841

18421842
" Test for v:searchforward variable
@@ -1852,7 +1852,7 @@ func Test_searchforward_var()
18521852
let v:searchforward = 1
18531853
normal N
18541854
call assert_equal(1, line('.'))
1855-
close!
1855+
bw!
18561856
endfunc
18571857

18581858
" Test for invalid regular expressions
@@ -1913,7 +1913,7 @@ func Test_search_in_visual_area()
19131913
call assert_equal([2, 5], [line('.'), col('.')])
19141914
exe "normal 2GVj$?\\%Vbar\<CR>\<Esc>"
19151915
call assert_equal([3, 5], [line('.'), col('.')])
1916-
close!
1916+
bw!
19171917
endfunc
19181918

19191919
" Test for searching with 'smartcase' and 'ignorecase'
@@ -1941,7 +1941,7 @@ func Test_search_smartcase()
19411941
call assert_equal([2, 4], [line('.'), col('.')])
19421942

19431943
set ignorecase& smartcase&
1944-
close!
1944+
bw!
19451945
endfun
19461946

19471947
" Test 'smartcase' with utf-8.
@@ -2039,7 +2039,7 @@ func Test_search_offset()
20392039
exe "normal /four/e+1\<CR>"
20402040
call assert_equal([2, 10], [line('.'), col('.')])
20412041

2042-
close!
2042+
bw!
20432043
endfunc
20442044

20452045
" Test for searching for matching parenthesis using %
@@ -2065,7 +2065,7 @@ func Test_search_match_paren()
20652065
normal 20|%
20662066
call assert_equal(4, col('.'))
20672067
set virtualedit&
2068-
close!
2068+
bw!
20692069
endfunc
20702070

20712071
" Test for searching a pattern and stopping before a specified line
@@ -2078,7 +2078,7 @@ func Test_search_stopline()
20782078
call cursor(4, 1)
20792079
call assert_equal(0, search('vim', 'bn', 2))
20802080
call assert_equal(1, search('vim', 'bn', 1))
2081-
close!
2081+
bw!
20822082
endfunc
20832083

20842084
func Test_incsearch_highlighting_newline()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ static char *(features[]) =
719719

720720
static int included_patches[] =
721721
{ /* Add new patch number below this line */
722+
/**/
723+
1613,
722724
/**/
723725
1612,
724726
/**/

0 commit comments

Comments
 (0)