diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-30 21:57:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-30 21:57:11 +0100 |
commit | 145d1fd91041bd2a22a11eef0357702e420796e2 (patch) | |
tree | 852bd5f3bb1de6e8db64d1e84431d16e5cd1ebdd /src/testdir/test_paste.vim | |
parent | cfb4d4f312e740c2fbb70c29c47cf74a76f8b605 (diff) | |
download | vim-git-9.0.0631.tar.gz |
patch 9.0.0631: too many delete() calls in testsv9.0.0631
Problem: Too many delete() calls in tests.
Solution: Use deferred delete where possible.
Diffstat (limited to 'src/testdir/test_paste.vim')
-rw-r--r-- | src/testdir/test_paste.vim | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim index 17ac9e4d5..d079f48f9 100644 --- a/src/testdir/test_paste.vim +++ b/src/testdir/test_paste.vim @@ -226,7 +226,7 @@ func Test_pastetoggle_timeout_no_typed_after_mapped() set ttimeoutlen=10000 imap d a END - call writefile(lines, 'Xpastetoggle_no_typed_after_mapped.vim') + call writefile(lines, 'Xpastetoggle_no_typed_after_mapped.vim', 'D') let buf = RunVimInTerminal('-S Xpastetoggle_no_typed_after_mapped.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('id', 't')\<CR>") @@ -236,7 +236,6 @@ func Test_pastetoggle_timeout_no_typed_after_mapped() call WaitForAssert({-> assert_match('^-- INSERT --', term_getline(buf, 8))}) call StopVimInTerminal(buf) - call delete('Xpastetoggle_no_typed_after_mapped.vim') endfunc func Test_pastetoggle_timeout_typed_after_mapped() @@ -247,7 +246,7 @@ func Test_pastetoggle_timeout_typed_after_mapped() set ttimeoutlen=10000 imap d a END - call writefile(lines, 'Xpastetoggle_typed_after_mapped.vim') + call writefile(lines, 'Xpastetoggle_typed_after_mapped.vim', 'D') let buf = RunVimInTerminal('-S Xpastetoggle_typed_after_mapped.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('idb', 't')\<CR>") @@ -257,7 +256,6 @@ func Test_pastetoggle_timeout_typed_after_mapped() call WaitForAssert({-> assert_match('^-- INSERT (paste) --', term_getline(buf, 8))}) call StopVimInTerminal(buf) - call delete('Xpastetoggle_typed_after_mapped.vim') endfunc func Test_pastetoggle_timeout_typed_after_noremap() @@ -268,7 +266,7 @@ func Test_pastetoggle_timeout_typed_after_noremap() set ttimeoutlen=10000 inoremap d a END - call writefile(lines, 'Xpastetoggle_typed_after_noremap.vim') + call writefile(lines, 'Xpastetoggle_typed_after_noremap.vim', 'D') let buf = RunVimInTerminal('-S Xpastetoggle_typed_after_noremap.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('idb', 't')\<CR>") @@ -278,7 +276,6 @@ func Test_pastetoggle_timeout_typed_after_noremap() call WaitForAssert({-> assert_match('^-- INSERT (paste) --', term_getline(buf, 8))}) call StopVimInTerminal(buf) - call delete('Xpastetoggle_typed_after_noremap.vim') endfunc " Test for restoring option values when 'paste' is disabled |