mirror of
https://github.com/neovim/neovim.git
synced 2026-04-27 09:44:07 +00:00
vim-patch:9.2.0125: tests: test_textformat.vim leaves swapfiles behind
Problem: tests: test_textformat.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!
271f4fe47b
N/A patches:
vim-patch:9.2.0122: Vim still supports compiling on NeXTSTEP
vim-patch:bab7619: runtime(doc): Update intro.txt about Neovim
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -623,7 +623,7 @@ func Test_format_align()
|
|||||||
right
|
right
|
||||||
setlocal norightleft
|
setlocal norightleft
|
||||||
call assert_equal("Vim", getline(1))
|
call assert_equal("Vim", getline(1))
|
||||||
close!
|
bw!
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set tw&
|
set tw&
|
||||||
@@ -1033,7 +1033,7 @@ func Test_mps_latin1()
|
|||||||
normal %
|
normal %
|
||||||
call assert_equal(4, col('.'))
|
call assert_equal(4, col('.'))
|
||||||
let &encoding = save_enc
|
let &encoding = save_enc
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_empty_matchpairs()
|
func Test_empty_matchpairs()
|
||||||
@@ -1173,7 +1173,7 @@ func Test_visual_gq_format()
|
|||||||
redraw!
|
redraw!
|
||||||
normal gq
|
normal gq
|
||||||
setl textwidth&
|
setl textwidth&
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for 'n' flag in 'formatoptions' to format numbered lists
|
" Test for 'n' flag in 'formatoptions' to format numbered lists
|
||||||
@@ -1186,7 +1186,7 @@ func Test_fo_n()
|
|||||||
normal gggqG
|
normal gggqG
|
||||||
call assert_equal([' 1) one two', ' three', ' four', ' 2) two'],
|
call assert_equal([' 1) one two', ' three', ' four', ' 2) two'],
|
||||||
\ getline(1, '$'))
|
\ getline(1, '$'))
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for 'formatlistpat' option
|
" Test for 'formatlistpat' option
|
||||||
@@ -1200,7 +1200,7 @@ func Test_formatlistpat()
|
|||||||
normal gggqG
|
normal gggqG
|
||||||
call assert_equal([' - one', ' two', ' three', ' - two'],
|
call assert_equal([' - one', ' two', ' three', ' - two'],
|
||||||
\ getline(1, '$'))
|
\ getline(1, '$'))
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for the 'b' and 'v' flags in 'formatoptions'
|
" Test for the 'b' and 'v' flags in 'formatoptions'
|
||||||
@@ -1233,7 +1233,7 @@ func Test_fo_b()
|
|||||||
call feedkeys('Amore five', 'xt')
|
call feedkeys('Amore five', 'xt')
|
||||||
call assert_equal(['one two three fourmore', 'five'], getline(1, '$'))
|
call assert_equal(['one two three fourmore', 'five'], getline(1, '$'))
|
||||||
|
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for the '1' flag in 'formatoptions'. Don't wrap text after a one letter
|
" Test for the '1' flag in 'formatoptions'. Don't wrap text after a one letter
|
||||||
@@ -1253,7 +1253,7 @@ func Test_fo_1()
|
|||||||
call feedkeys('A a bird', 'xt')
|
call feedkeys('A a bird', 'xt')
|
||||||
call assert_equal(['one two three four', 'a bird'], getline(1, '$'))
|
call assert_equal(['one two three four', 'a bird'], getline(1, '$'))
|
||||||
|
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for 'l' flag in 'formatoptions'. When starting insert mode, if a line
|
" Test for 'l' flag in 'formatoptions'. When starting insert mode, if a line
|
||||||
@@ -1273,7 +1273,7 @@ func Test_fo_l()
|
|||||||
call feedkeys('A six', 'xt')
|
call feedkeys('A six', 'xt')
|
||||||
call assert_equal(['one two three four five six'], getline(1, '$'))
|
call assert_equal(['one two three four five six'], getline(1, '$'))
|
||||||
|
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for the '2' flag in 'formatoptions'
|
" Test for the '2' flag in 'formatoptions'
|
||||||
@@ -1289,7 +1289,7 @@ func Test_fo_2()
|
|||||||
call assert_equal(["\tfirst line of a",
|
call assert_equal(["\tfirst line of a",
|
||||||
\ "paragraph. second line of the",
|
\ "paragraph. second line of the",
|
||||||
\ "same paragraph. third line."], getline(1, '$'))
|
\ "same paragraph. third line."], getline(1, '$'))
|
||||||
close!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" This was leaving the cursor after the end of a line. Complicated way to
|
" This was leaving the cursor after the end of a line. Complicated way to
|
||||||
|
|||||||
Reference in New Issue
Block a user