summaryrefslogtreecommitdiff
path: root/src/testdir/test_winbuf_close.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-15 22:06:06 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-15 22:06:06 +0100
commitdb4c94788ad70118fa1ccc5fbc821757350ac771 (patch)
tree2e08a8a678c55470cb7239c0857678e7a5622ce8 /src/testdir/test_winbuf_close.vim
parent5b148ef2628251b2d79f78c65a614f8aca404329 (diff)
downloadvim-git-db4c94788ad70118fa1ccc5fbc821757350ac771.tar.gz
patch 9.0.0769: too many delete() calls in testsv9.0.0769
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
Diffstat (limited to 'src/testdir/test_winbuf_close.vim')
-rw-r--r--src/testdir/test_winbuf_close.vim10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/testdir/test_winbuf_close.vim b/src/testdir/test_winbuf_close.vim
index 2530be063..17e31e49d 100644
--- a/src/testdir/test_winbuf_close.vim
+++ b/src/testdir/test_winbuf_close.vim
@@ -12,9 +12,9 @@
func Test_winbuf_close()
enew | only
- call writefile(['testtext 1'], 'Xtest1')
- call writefile(['testtext 2'], 'Xtest2')
- call writefile(['testtext 3'], 'Xtest3')
+ call writefile(['testtext 1'], 'Xtest1', 'D')
+ call writefile(['testtext 2'], 'Xtest2', 'D')
+ call writefile(['testtext 3'], 'Xtest3', 'D')
next! Xtest1 Xtest2
call setline(1, 'testtext 1 1')
@@ -117,10 +117,6 @@ func Test_winbuf_close()
call assert_equal('Xtest3', bufname('%'))
call assert_fails('silent! quit!', 'E37:')
call assert_equal('Xtest1', bufname('%'))
-
- call delete('Xtest1')
- call delete('Xtest2')
- call delete('Xtest3')
endfunc
" Test that ":close" will respect 'winfixheight' when possible.