To: vim_dev@googlegroups.com Subject: Patch 9.0.0631 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0631 Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible. Files: src/testdir/test_options.vim, src/testdir/test_packadd.vim, src/testdir/test_paste.vim, src/testdir/test_plus_arg_edit.vim, src/testdir/test_popupwin.vim, src/testdir/test_popupwin_textprop.vim, src/testdir/test_preview.vim, src/testdir/test_profile.vim, src/testdir/test_prompt_buffer.vim, src/testdir/test_python3.vim *** ../vim-9.0.0630/src/testdir/test_options.vim 2022-09-22 13:57:29.075199731 +0100 --- src/testdir/test_options.vim 2022-09-30 21:50:40.199790401 +0100 *************** *** 692,698 **** call writefile(['errors:'] + v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' let saveenv = {} --- 692,698 ---- call writefile(['errors:'] + v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter', 'D') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' let saveenv = {} *************** *** 710,716 **** endfor call delete('Xtestout') - call delete('Xafter') " Duplicates should be filtered out (option has P_NODUP) let backupskip = &backupskip --- 710,715 ---- *************** *** 898,908 **** for val in ['', 'nofile', 'nowrite', 'acwrite', 'quickfix', 'help', 'terminal', 'prompt', 'popup'] exe 'set buftype=' .. val ! call writefile(['something'], 'XBuftype') call assert_fails('write XBuftype', 'E13:', 'with buftype=' .. val) endfor - call delete('XBuftype') bwipe! endfunc --- 897,906 ---- for val in ['', 'nofile', 'nowrite', 'acwrite', 'quickfix', 'help', 'terminal', 'prompt', 'popup'] exe 'set buftype=' .. val ! call writefile(['something'], 'XBuftype', 'D') call assert_fails('write XBuftype', 'E13:', 'with buftype=' .. val) endfor bwipe! endfunc *************** *** 1129,1141 **** below sp | wincmd _ below sp END ! call writefile(lines, 'Xwinminheight') let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) call term_sendkeys(buf, ":set wmh=1\n") call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) call StopVimInTerminal(buf) - call delete('Xwinminheight') endfunc func Test_opt_winminheight_term_tabs() --- 1127,1138 ---- below sp | wincmd _ below sp END ! call writefile(lines, 'Xwinminheight', 'D') let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) call term_sendkeys(buf, ":set wmh=1\n") call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) call StopVimInTerminal(buf) endfunc func Test_opt_winminheight_term_tabs() *************** *** 1150,1162 **** split tabnew END ! call writefile(lines, 'Xwinminheight') let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) call term_sendkeys(buf, ":set wmh=1\n") call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) call StopVimInTerminal(buf) - call delete('Xwinminheight') endfunc " Test for the 'winminwidth' option --- 1147,1158 ---- split tabnew END ! call writefile(lines, 'Xwinminheight', 'D') let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) call term_sendkeys(buf, ":set wmh=1\n") call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) call StopVimInTerminal(buf) endfunc " Test for the 'winminwidth' option *************** *** 1185,1199 **** set scroll=2 set laststatus=2 [CODE] ! call writefile(vimrc, 'Xscroll') let buf = RunVimInTerminal('-S Xscroll', {'rows': 16, 'cols': 45}) call term_sendkeys(buf, ":verbose set scroll?\n") call WaitForAssert({-> assert_match('Last set.*window size', term_getline(buf, 15))}) call assert_match('^\s*scroll=7$', term_getline(buf, 14)) - call StopVimInTerminal(buf) " clean up ! call delete('Xscroll') endfunc " Check that VIM_POSIX env variable influences default value of 'cpo' and 'shm' --- 1181,1194 ---- set scroll=2 set laststatus=2 [CODE] ! call writefile(vimrc, 'Xscroll', 'D') let buf = RunVimInTerminal('-S Xscroll', {'rows': 16, 'cols': 45}) call term_sendkeys(buf, ":verbose set scroll?\n") call WaitForAssert({-> assert_match('Last set.*window size', term_getline(buf, 15))}) call assert_match('^\s*scroll=7$', term_getline(buf, 14)) " clean up ! call StopVimInTerminal(buf) endfunc " Check that VIM_POSIX env variable influences default value of 'cpo' and 'shm' *** ../vim-9.0.0630/src/testdir/test_packadd.vim 2022-08-29 22:31:15.919685279 +0100 --- src/testdir/test_packadd.vim 2022-09-30 21:31:03.438388654 +0100 *************** *** 256,262 **** \ 'endfunc'], fname) call assert_equal(1666, foobar#test()) - call delete(fname) endfunc func Test_helptags() --- 256,261 ---- *** ../vim-9.0.0630/src/testdir/test_paste.vim 2022-04-28 14:01:05.000000000 +0100 --- src/testdir/test_paste.vim 2022-09-30 21:31:36.770284836 +0100 *************** *** 226,232 **** set ttimeoutlen=10000 imap d a END ! call writefile(lines, 'Xpastetoggle_no_typed_after_mapped.vim') let buf = RunVimInTerminal('-S Xpastetoggle_no_typed_after_mapped.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('id', 't')\") --- 226,232 ---- set ttimeoutlen=10000 imap d a END ! 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')\") *************** *** 236,242 **** 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() --- 236,241 ---- *************** *** 247,253 **** set ttimeoutlen=10000 imap d a END ! call writefile(lines, 'Xpastetoggle_typed_after_mapped.vim') let buf = RunVimInTerminal('-S Xpastetoggle_typed_after_mapped.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('idb', 't')\") --- 246,252 ---- set ttimeoutlen=10000 imap d a END ! 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')\") *************** *** 257,263 **** 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() --- 256,261 ---- *************** *** 268,274 **** set ttimeoutlen=10000 inoremap d a END ! call writefile(lines, 'Xpastetoggle_typed_after_noremap.vim') let buf = RunVimInTerminal('-S Xpastetoggle_typed_after_noremap.vim', #{rows: 8}) call TermWait(buf) call term_sendkeys(buf, ":call feedkeys('idb', 't')\") --- 266,272 ---- set ttimeoutlen=10000 inoremap d a END ! 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')\") *************** *** 278,284 **** 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 --- 276,281 ---- *** ../vim-9.0.0630/src/testdir/test_plus_arg_edit.vim 2022-09-02 21:55:45.503049444 +0100 --- src/testdir/test_plus_arg_edit.vim 2022-09-30 21:31:59.698215327 +0100 *************** *** 1,18 **** " Tests for complicated + argument to :edit command function Test_edit() ! call writefile(["foo|bar"], "Xfile1") ! call writefile(["foo/bar"], "Xfile2") edit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w call assert_equal(["fooPIPEbar"], readfile("Xfile1")) call assert_equal(["fooSLASHbar"], readfile("Xfile2")) - call delete('Xfile1') - call delete('Xfile2') endfunction func Test_edit_bad() " Test loading a utf8 file with bad utf8 sequences. ! call writefile(["[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]"], "Xbadfile") new " Without ++bad=..., the default behavior is like ++bad=? --- 1,16 ---- " Tests for complicated + argument to :edit command function Test_edit() ! call writefile(["foo|bar"], "Xfile1", 'D') ! call writefile(["foo/bar"], "Xfile2", 'D') edit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w call assert_equal(["fooPIPEbar"], readfile("Xfile1")) call assert_equal(["fooSLASHbar"], readfile("Xfile2")) endfunction func Test_edit_bad() " Test loading a utf8 file with bad utf8 sequences. ! call writefile(["[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]"], "Xbadfile", 'D') new " Without ++bad=..., the default behavior is like ++bad=? *************** *** 31,37 **** call assert_fails('e! ++enc=utf8 ++bad=foo Xbadfile', 'E474:') bw! - call delete('Xbadfile') endfunc " Test for ++bin and ++nobin arguments --- 29,34 ---- *** ../vim-9.0.0630/src/testdir/test_popupwin.vim 2022-09-08 13:42:50.296283575 +0100 --- src/testdir/test_popupwin.vim 2022-09-30 21:43:56.788529794 +0100 *************** *** 19,25 **** let winid2 = popup_create(['another one', 'another two', 'another three'], #{line: 3, col: 25, minwidth: 20}) call setwinvar(winid2, '&wincolor', 'PopupColor2') END ! call writefile(lines, 'XtestPopup') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_01', {}) --- 19,25 ---- let winid2 = popup_create(['another one', 'another two', 'another three'], #{line: 3, col: 25, minwidth: 20}) call setwinvar(winid2, '&wincolor', 'PopupColor2') END ! call writefile(lines, 'XtestPopup', 'D') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_01', {}) *************** *** 73,79 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopup') endfunc func Test_popup_with_border_and_padding() --- 73,78 ---- *************** *** 95,106 **** call popup_create('X', #{line: 5, col: 76}) END call insert(lines, iter == 1 ? '' : 'set enc=latin1') ! call writefile(lines, 'XtestPopupBorder') let buf = RunVimInTerminal('-S XtestPopupBorder', #{rows: 15}) call VerifyScreenDump(buf, 'Test_popupwin_2' .. iter, {}) call StopVimInTerminal(buf) - call delete('XtestPopupBorder') endfor let lines =<< trim END --- 94,104 ---- call popup_create('X', #{line: 5, col: 76}) END call insert(lines, iter == 1 ? '' : 'set enc=latin1') ! call writefile(lines, 'XtestPopupBorder', 'D') let buf = RunVimInTerminal('-S XtestPopupBorder', #{rows: 15}) call VerifyScreenDump(buf, 'Test_popupwin_2' .. iter, {}) call StopVimInTerminal(buf) endfor let lines =<< trim END *************** *** 120,126 **** call popup_create(['hello'], #{line: 8, col: 43, border: [], borderchars: ['─', '│', '─', '│', '┌', '┐', '┘', '└']}) endfunc END ! call writefile(lines, 'XtestPopupBorder') let buf = RunVimInTerminal('-S XtestPopupBorder', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_22', {}) --- 118,124 ---- call popup_create(['hello'], #{line: 8, col: 43, border: [], borderchars: ['─', '│', '─', '│', '┌', '┐', '┘', '└']}) endfunc END ! call writefile(lines, 'XtestPopupBorder', 'D') let buf = RunVimInTerminal('-S XtestPopupBorder', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_22', {}) *************** *** 135,141 **** endif call StopVimInTerminal(buf) - call delete('XtestPopupBorder') let with_border_or_padding = #{ \ line: 2, --- 133,138 ---- *************** *** 221,233 **** \], #{line: 3, col: 25, highlight: 'PopupColor'}) call win_execute(winid, 'set syntax=cpp') END ! call writefile(lines, 'XtestPopup') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_10', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopup') endfunc func Test_popup_with_syntax_setbufvar() --- 218,229 ---- \], #{line: 3, col: 25, highlight: 'PopupColor'}) call win_execute(winid, 'set syntax=cpp') END ! call writefile(lines, 'XtestPopup', 'D') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_10', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_with_syntax_setbufvar() *************** *** 245,257 **** \], #{line: 3, col: 21, highlight: 'PopupColor'}) call setbufvar(winbufnr(winid), '&syntax', 'cpp') END ! call writefile(lines, 'XtestPopup') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_11', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopup') endfunc func Test_popup_with_matches() --- 241,252 ---- \], #{line: 3, col: 21, highlight: 'PopupColor'}) call setbufvar(winbufnr(winid), '&syntax', 'cpp') END ! call writefile(lines, 'XtestPopup', 'D') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_11', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_with_matches() *************** *** 271,283 **** call win_execute(winid, "call matchadd('ErrorMsg', '111')") call win_execute(winid, "call matchadd('VeryBlue', '555')") END ! call writefile(lines, 'XtestPopupMatches') let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_matches', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMatches') endfunc func Test_popup_all_corners() --- 266,277 ---- call win_execute(winid, "call matchadd('ErrorMsg', '111')") call win_execute(winid, "call matchadd('VeryBlue', '555')") END ! call writefile(lines, 'XtestPopupMatches', 'D') let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_matches', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_all_corners() *************** *** 327,339 **** \ padding: [], \ }) END ! call writefile(lines, 'XtestPopupCorners') let buf = RunVimInTerminal('-S XtestPopupCorners', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_corners', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopupCorners') endfunc func Test_popup_nospace() --- 321,332 ---- \ padding: [], \ }) END ! call writefile(lines, 'XtestPopupCorners', 'D') let buf = RunVimInTerminal('-S XtestPopupCorners', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_corners', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_nospace() *************** *** 419,431 **** \ border: [], \ }) END ! call writefile(lines, 'XtestPopupNospace') let buf = RunVimInTerminal('-S XtestPopupNospace', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_nospace', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopupNospace') endfunc func Test_popup_firstline_dump() --- 412,423 ---- \ border: [], \ }) END ! call writefile(lines, 'XtestPopupNospace', 'D') let buf = RunVimInTerminal('-S XtestPopupNospace', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_nospace', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_firstline_dump() *************** *** 438,444 **** \ firstline: 3, \ }) END ! call writefile(lines, 'XtestPopupFirstline') let buf = RunVimInTerminal('-S XtestPopupFirstline', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_firstline_1', {}) --- 430,436 ---- \ firstline: 3, \ }) END ! call writefile(lines, 'XtestPopupFirstline', 'D') let buf = RunVimInTerminal('-S XtestPopupFirstline', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_firstline_1', {}) *************** *** 448,454 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupFirstline') endfunc func Test_popup_firstline() --- 440,445 ---- *************** *** 604,610 **** call feedkeys("\\\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupDrag') let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_drag_01', {}) --- 595,601 ---- call feedkeys("\\\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupDrag', 'D') let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_drag_01', {}) *************** *** 626,632 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupDrag') endfunc func Test_popup_drag_minwidth() --- 617,622 ---- *************** *** 656,662 **** call feedkeys("\\\\\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupDrag') let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_drag_minwidth_1', {}) --- 646,652 ---- call feedkeys("\\\\\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupDrag', 'D') let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_drag_minwidth_1', {}) *************** *** 670,676 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupDrag') endfunc func Test_popup_drag_termwin() --- 660,665 ---- *************** *** 712,718 **** map :call test_setmouse(12, &columns / 2) map :call test_setmouse(12, &columns / 2 - 20) END ! call writefile(lines, 'XtestPopupTerm') let buf = RunVimInTerminal('-S XtestPopupTerm', #{rows: 16}) call VerifyScreenDump(buf, 'Test_popupwin_term_01', {}) --- 701,707 ---- map :call test_setmouse(12, &columns / 2) map :call test_setmouse(12, &columns / 2 - 20) END ! call writefile(lines, 'XtestPopupTerm', 'D') let buf = RunVimInTerminal('-S XtestPopupTerm', #{rows: 16}) call VerifyScreenDump(buf, 'Test_popupwin_term_01', {}) *************** *** 727,733 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupTerm') endfunc func Test_popup_close_with_mouse() --- 716,721 ---- *************** *** 780,786 **** \ }) endfunc END ! call writefile(lines, 'XtestPopupClose') let buf = RunVimInTerminal('-S XtestPopupClose', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_close_01', {}) --- 768,774 ---- \ }) endfunc END ! call writefile(lines, 'XtestPopupClose', 'D') let buf = RunVimInTerminal('-S XtestPopupClose', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_close_01', {}) *************** *** 800,806 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupClose') endfunction func Test_popup_menu_wrap() --- 788,793 ---- *************** *** 822,828 **** \ filter: 'popup_filter_menu', \ }) END ! call writefile(lines, 'XtestPopupWrap') let buf = RunVimInTerminal('-S XtestPopupWrap', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_wrap_1', {}) --- 809,815 ---- \ filter: 'popup_filter_menu', \ }) END ! call writefile(lines, 'XtestPopupWrap', 'D') let buf = RunVimInTerminal('-S XtestPopupWrap', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_wrap_1', {}) *************** *** 832,838 **** " clean up call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('XtestPopupWrap') endfunction func Test_popup_with_mask() --- 819,824 ---- *************** *** 877,883 **** \ border: [], \ mask: [[1,2,1,1], [-5,-1,4,4], [7,9,2,3], [3,5,5,5],[-7,-4,5,5]]}) END ! call writefile(lines, 'XtestPopupMask') let buf = RunVimInTerminal('-S XtestPopupMask', #{rows: 13}) call VerifyScreenDump(buf, 'Test_popupwin_mask_1', {}) --- 863,869 ---- \ border: [], \ mask: [[1,2,1,1], [-5,-1,4,4], [7,9,2,3], [3,5,5,5],[-7,-4,5,5]]}) END ! call writefile(lines, 'XtestPopupMask', 'D') let buf = RunVimInTerminal('-S XtestPopupMask', #{rows: 13}) call VerifyScreenDump(buf, 'Test_popupwin_mask_1', {}) *************** *** 903,909 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMask') " this was causing a crash call popup_create('test', #{mask: [[0, 0, 0, 0]]}) --- 889,894 ---- *************** *** 950,956 **** map :call test_setmouse(4, 15) map :call test_setmouse(6, 23) END ! call writefile(lines, 'XtestPopupSelect') let buf = RunVimInTerminal('-S XtestPopupSelect', #{rows: 10}) call term_sendkeys(buf, ":call Select1()\") call VerifyScreenDump(buf, 'Test_popupwin_select_01', {}) --- 935,941 ---- map :call test_setmouse(4, 15) map :call test_setmouse(6, 23) END ! call writefile(lines, 'XtestPopupSelect', 'D') let buf = RunVimInTerminal('-S XtestPopupSelect', #{rows: 10}) call term_sendkeys(buf, ":call Select1()\") call VerifyScreenDump(buf, 'Test_popupwin_select_01', {}) *************** *** 964,970 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupSelect') endfunc func Test_popup_in_tab() --- 949,954 ---- *************** *** 1146,1158 **** \ 'a long line that wont fit', \ #{line: 3, col: 20, maxwidth: 10, wrap: 1}) END ! call writefile(lines, 'XtestPopup') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_wrap', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopup') endfunc func Test_popup_without_wrap() --- 1130,1141 ---- \ 'a long line that wont fit', \ #{line: 3, col: 20, maxwidth: 10, wrap: 1}) END ! call writefile(lines, 'XtestPopup', 'D') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_wrap', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_without_wrap() *************** *** 1164,1176 **** \ 'a long line that wont fit', \ #{line: 3, col: 20, maxwidth: 10, wrap: 0}) END ! call writefile(lines, 'XtestPopup') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_nowrap', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopup') endfunc func Test_popup_with_showbreak() --- 1147,1158 ---- \ 'a long line that wont fit', \ #{line: 3, col: 20, maxwidth: 10, wrap: 0}) END ! call writefile(lines, 'XtestPopup', 'D') let buf = RunVimInTerminal('-S XtestPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_nowrap', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_with_showbreak() *************** *** 1184,1197 **** \ #{filter: 'popup_filter_yesno', \ maxwidth: 12}) END ! call writefile(lines, 'XtestPopupShowbreak') let buf = RunVimInTerminal('-S XtestPopupShowbreak', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_showbreak', {}) " clean up call term_sendkeys(buf, "y") call StopVimInTerminal(buf) - call delete('XtestPopupShowbreak') endfunc func Test_popup_time() --- 1166,1178 ---- \ #{filter: 'popup_filter_yesno', \ maxwidth: 12}) END ! call writefile(lines, 'XtestPopupShowbreak', 'D') let buf = RunVimInTerminal('-S XtestPopupShowbreak', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_showbreak', {}) " clean up call term_sendkeys(buf, "y") call StopVimInTerminal(buf) endfunc func Test_popup_time() *************** *** 1559,1571 **** normal 0fX call popup_atcursor('mark', {}) END ! call writefile(lines, 'XtestPopupAtcursorPos') let buf = RunVimInTerminal('-S XtestPopupAtcursorPos', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_atcursor_pos', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopupAtcursorPos') endfunc func Test_popup_beval() --- 1540,1551 ---- normal 0fX call popup_atcursor('mark', {}) END ! call writefile(lines, 'XtestPopupAtcursorPos', 'D') let buf = RunVimInTerminal('-S XtestPopupAtcursorPos', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popupwin_atcursor_pos', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_popup_beval() *************** *** 1596,1602 **** call feedkeys("\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupBeval') let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10}) call TermWait(buf, 50) call term_sendkeys(buf, 'j') --- 1576,1582 ---- call feedkeys("\\\", "xt") endfunc END ! call writefile(lines, 'XtestPopupBeval', 'D') let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10}) call TermWait(buf, 50) call term_sendkeys(buf, 'j') *************** *** 1611,1617 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupBeval') endfunc func Test_popup_filter() --- 1591,1596 ---- *************** *** 1677,1689 **** let g:winid = popup_create(text, #{maxheight: 5, minwidth: 3, filter: 'invalidfilter'}) call timer_start(0, {-> win_execute(g:winid, 'norm! 10Gzz')}) END ! call writefile(lines, 'XtestPopupNormal') let buf = RunVimInTerminal('-S XtestPopupNormal', #{rows: 10}) call TermWait(buf, 100) call VerifyScreenDump(buf, 'Test_popupwin_normal_cmd', {}) call StopVimInTerminal(buf) - call delete('XtestPopupNormal') endfunc " test that cursor line highlight is updated after using win_execute() --- 1656,1667 ---- let g:winid = popup_create(text, #{maxheight: 5, minwidth: 3, filter: 'invalidfilter'}) call timer_start(0, {-> win_execute(g:winid, 'norm! 10Gzz')}) END ! call writefile(lines, 'XtestPopupNormal', 'D') let buf = RunVimInTerminal('-S XtestPopupNormal', #{rows: 10}) call TermWait(buf, 100) call VerifyScreenDump(buf, 'Test_popupwin_normal_cmd', {}) call StopVimInTerminal(buf) endfunc " test that cursor line highlight is updated after using win_execute() *************** *** 1699,1705 **** \ }) redraw END ! call writefile(lines, 'XtestPopupWinExecute') let buf = RunVimInTerminal('-S XtestPopupWinExecute', #{rows: 14}) call term_sendkeys(buf, ":call win_execute(g:id, ['normal 17Gzz'])\") --- 1677,1683 ---- \ }) redraw END ! call writefile(lines, 'XtestPopupWinExecute', 'D') let buf = RunVimInTerminal('-S XtestPopupWinExecute', #{rows: 14}) call term_sendkeys(buf, ":call win_execute(g:id, ['normal 17Gzz'])\") *************** *** 1708,1714 **** call VerifyScreenDump(buf, 'Test_popupwin_win_execute_cursorline', {}) call StopVimInTerminal(buf) - call delete('XtestPopupWinExecute') endfunc func Test_popup_set_firstline() --- 1686,1691 ---- *************** *** 1726,1732 **** call popup_setoptions(g:id, #{firstline: 10}) redraw END ! call writefile(lines, 'XtestPopupWinSetFirstline') let buf = RunVimInTerminal('-S XtestPopupWinSetFirstline', #{rows: 16}) call VerifyScreenDump(buf, 'Test_popupwin_set_firstline_1', {}) --- 1703,1709 ---- call popup_setoptions(g:id, #{firstline: 10}) redraw END ! call writefile(lines, 'XtestPopupWinSetFirstline', 'D') let buf = RunVimInTerminal('-S XtestPopupWinSetFirstline', #{rows: 16}) call VerifyScreenDump(buf, 'Test_popupwin_set_firstline_1', {}) *************** *** 1736,1742 **** call VerifyScreenDump(buf, 'Test_popupwin_set_firstline_2', {}) call StopVimInTerminal(buf) - call delete('XtestPopupWinSetFirstline') endfunc " this tests that we don't get stuck with an error in "win_execute()" --- 1713,1718 ---- *************** *** 1747,1753 **** let g:winid = popup_create('some text', {'filter': 'invalidfilter'}) call timer_start(0, {-> win_execute(g:winid, 'invalidCommand')}) END ! call writefile(lines, 'XtestPopupWinExecuteError') let buf = RunVimInTerminal('-S XtestPopupWinExecuteError', #{rows: 10, wait_for_ruler: 0}) call WaitFor({-> term_getline(buf, 9) =~ 'Not an editor command: invalidCommand'}) --- 1723,1729 ---- let g:winid = popup_create('some text', {'filter': 'invalidfilter'}) call timer_start(0, {-> win_execute(g:winid, 'invalidCommand')}) END ! call writefile(lines, 'XtestPopupWinExecuteError', 'D') let buf = RunVimInTerminal('-S XtestPopupWinExecuteError', #{rows: 10, wait_for_ruler: 0}) call WaitFor({-> term_getline(buf, 9) =~ 'Not an editor command: invalidCommand'}) *************** *** 1760,1766 **** call VerifyScreenDump(buf, 'Test_popupwin_win_execute', {}) call StopVimInTerminal(buf) - call delete('XtestPopupWinExecuteError') endfunc func ShowDialog(key, result) --- 1736,1741 ---- *************** *** 1837,1843 **** echomsg "selected " .. a:res endfunc END ! call writefile(lines, 'XtestPopupMenu') let buf = RunVimInTerminal('-S XtestPopupMenu', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_menu_01', {}) --- 1812,1818 ---- echomsg "selected " .. a:res endfunc END ! call writefile(lines, 'XtestPopupMenu', 'D') let buf = RunVimInTerminal('-S XtestPopupMenu', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_menu_01', {}) *************** *** 1849,1855 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMenu') endfunc func Test_popup_menu_narrow() --- 1824,1829 ---- *************** *** 1863,1876 **** echomsg "selected " .. a:res endfunc END ! call writefile(lines, 'XtestPopupNarrowMenu') let buf = RunVimInTerminal('-S XtestPopupNarrowMenu', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_menu_04', {}) " clean up call term_sendkeys(buf, "x") call StopVimInTerminal(buf) - call delete('XtestPopupNarrowMenu') endfunc func Test_popup_title() --- 1837,1849 ---- echomsg "selected " .. a:res endfunc END ! call writefile(lines, 'XtestPopupNarrowMenu', 'D') let buf = RunVimInTerminal('-S XtestPopupNarrowMenu', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_menu_04', {}) " clean up call term_sendkeys(buf, "x") call StopVimInTerminal(buf) endfunc func Test_popup_title() *************** *** 1882,1888 **** call setline(1, range(1, 20)) let winid = popup_create(['one', 'two', 'another'], #{title: 'Title String'}) END ! call writefile(lines, 'XtestPopupTitle') let buf = RunVimInTerminal('-S XtestPopupTitle', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_title', {}) --- 1855,1861 ---- call setline(1, range(1, 20)) let winid = popup_create(['one', 'two', 'another'], #{title: 'Title String'}) END ! call writefile(lines, 'XtestPopupTitle', 'D') let buf = RunVimInTerminal('-S XtestPopupTitle', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_title', {}) *************** *** 1911,1917 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupTitle') let winid = popup_create('something', #{title: 'Some Title'}) call assert_equal('Some Title', popup_getoptions(winid).title) --- 1884,1889 ---- *************** *** 1972,1985 **** \ col : col, \ }) END ! call writefile(lines, 'XtestPopupBehind') let buf = RunVimInTerminal('-S XtestPopupBehind', #{rows: 10}) call term_sendkeys(buf, "\w") call VerifyScreenDump(buf, 'Test_popupwin_behind', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestPopupBehind') endfunc func s:VerifyPosition(p, msg, line, col, width, height) --- 1944,1956 ---- \ col : col, \ }) END ! call writefile(lines, 'XtestPopupBehind', 'D') let buf = RunVimInTerminal('-S XtestPopupBehind', #{rows: 10}) call term_sendkeys(buf, "\w") call VerifyScreenDump(buf, 'Test_popupwin_behind', {}) " clean up call StopVimInTerminal(buf) endfunc func s:VerifyPosition(p, msg, line, col, width, height) *************** *** 2261,2267 **** hi Notification ctermbg=lightblue call popup_notification('first notification', {}) END ! call writefile(lines, 'XtestNotifications') let buf = RunVimInTerminal('-S XtestNotifications', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {}) --- 2232,2238 ---- hi Notification ctermbg=lightblue call popup_notification('first notification', {}) END ! call writefile(lines, 'XtestNotifications', 'D') let buf = RunVimInTerminal('-S XtestNotifications', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {}) *************** *** 2272,2278 **** " clean up call StopVimInTerminal(buf) - call delete('XtestNotifications') endfunc func Test_popup_scrollbar() --- 2243,2248 ---- *************** *** 2351,2357 **** map :call test_setmouse(4, 42) map :call test_setmouse(7, 42) END ! call writefile(lines, 'XtestPopupScroll') let buf = RunVimInTerminal('-S XtestPopupScroll', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_scroll_1', {}) --- 2321,2327 ---- map :call test_setmouse(4, 42) map :call test_setmouse(7, 42) END ! call writefile(lines, 'XtestPopupScroll', 'D') let buf = RunVimInTerminal('-S XtestPopupScroll', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_scroll_1', {}) *************** *** 2409,2415 **** " clean up call term_sendkeys(buf, "x") call StopVimInTerminal(buf) - call delete('XtestPopupScroll') endfunc func Test_popup_too_high_scrollbar() --- 2379,2384 ---- *************** *** 2428,2434 **** normal 3G$ call ShowPopup() END ! call writefile(lines, 'XtestPopupToohigh') let buf = RunVimInTerminal('-S XtestPopupToohigh', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_toohigh_1', {}) --- 2397,2403 ---- normal 3G$ call ShowPopup() END ! call writefile(lines, 'XtestPopupToohigh', 'D') let buf = RunVimInTerminal('-S XtestPopupToohigh', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_toohigh_1', {}) *************** *** 2444,2450 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupToohigh') endfunc func Test_popup_fitting_scrollbar() --- 2413,2418 ---- *************** *** 2468,2474 **** eval p->popup_settext('this is a text') END ! call writefile(lines, 'XtestPopupSetText') let buf = RunVimInTerminal('-S XtestPopupSetText', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_settext_01', {}) --- 2436,2442 ---- eval p->popup_settext('this is a text') END ! call writefile(lines, 'XtestPopupSetText', 'D') let buf = RunVimInTerminal('-S XtestPopupSetText', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_settext_01', {}) *************** *** 2502,2508 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupSetText') endfunc func Test_popup_settext_getline() --- 2470,2475 ---- *************** *** 2772,2778 **** endfunc func Test_popupwin_with_buffer() ! call writefile(['some text', 'in a buffer'], 'XsomeFile') let buf = bufadd('XsomeFile') call assert_equal(0, bufloaded(buf)) --- 2739,2745 ---- endfunc func Test_popupwin_with_buffer() ! call writefile(['some text', 'in a buffer'], 'XsomeFile', 'D') let buf = bufadd('XsomeFile') call assert_equal(0, bufloaded(buf)) *************** *** 2799,2810 **** let winid = popup_create(bufnr(''), {}) redraw call popup_close(winid) - call delete('XsomeFile') endfunc func Test_popupwin_buffer_with_swapfile() ! call writefile(['some text', 'in a buffer'], 'XopenFile') ! call writefile([''], '.XopenFile.swp') let g:ignoreSwapExists = 1 let bufnr = bufadd('XopenFile') --- 2766,2776 ---- let winid = popup_create(bufnr(''), {}) redraw call popup_close(winid) endfunc func Test_popupwin_buffer_with_swapfile() ! call writefile(['some text', 'in a buffer'], 'XopenFile', 'D') ! call writefile([''], '.XopenFile.swp', 'D') let g:ignoreSwapExists = 1 let bufnr = bufadd('XopenFile') *************** *** 2817,2824 **** call assert_equal(1, &readonly) bwipe! - call delete('XopenFile') - call delete('.XopenFile.swp') unlet g:ignoreSwapExists endfunc --- 2783,2788 ---- *************** *** 2903,2909 **** CheckScreendump CheckUnix ! call writefile(range(50), 'Xtestfile') let lines =<< trim END vim9script --- 2867,2873 ---- CheckScreendump CheckUnix ! call writefile(range(50), 'Xtestfile', 'D') let lines =<< trim END vim9script *************** *** 2920,2926 **** border: [] }) END ! call writefile(lines, 'Xpterm') let buf = RunVimInTerminal('-S Xpterm', #{rows: 15}) call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_1', {}) --- 2884,2890 ---- border: [] }) END ! call writefile(lines, 'Xpterm', 'D') let buf = RunVimInTerminal('-S Xpterm', #{rows: 15}) call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_1', {}) *************** *** 2937,2944 **** call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_4', {}) call StopVimInTerminal(buf) - call delete('Xtestfile') - call delete('Xpterm') endfunc func Test_popupwin_close_prevwin() --- 2901,2906 ---- *************** *** 3049,3055 **** call PopupMenu([repeat('123456789|', 100)], 7, 16) call PopupMenu(repeat(['123456789|' .. ' '], 5), 1, 33, 1) END ! call writefile(lines, 'XtestPopupMenuMaxWidth') let buf = RunVimInTerminal('-S XtestPopupMenuMaxWidth', #{rows: 13}) call VerifyScreenDump(buf, 'Test_popupwin_menu_maxwidth_1', {}) --- 3011,3017 ---- call PopupMenu([repeat('123456789|', 100)], 7, 16) call PopupMenu(repeat(['123456789|' .. ' '], 5), 1, 33, 1) END ! call writefile(lines, 'XtestPopupMenuMaxWidth', 'D') let buf = RunVimInTerminal('-S XtestPopupMenuMaxWidth', #{rows: 13}) call VerifyScreenDump(buf, 'Test_popupwin_menu_maxwidth_1', {}) *************** *** 3062,3068 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMenuMaxWidth') endfunc func Test_popup_menu_with_scrollbar() --- 3024,3029 ---- *************** *** 3079,3085 **** \ maxheight: 3, \ }) END ! call writefile(lines, 'XtestPopupMenuScroll') let buf = RunVimInTerminal('-S XtestPopupMenuScroll', #{rows: 10}) call term_sendkeys(buf, "j") --- 3040,3046 ---- \ maxheight: 3, \ }) END ! call writefile(lines, 'XtestPopupMenuScroll', 'D') let buf = RunVimInTerminal('-S XtestPopupMenuScroll', #{rows: 10}) call term_sendkeys(buf, "j") *************** *** 3107,3113 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMenuScroll') endfunc func Test_popup_menu_filter() --- 3068,3073 ---- *************** *** 3142,3148 **** \ filter : 'MyFilter' \ }) END ! call writefile(lines, 'XtestPopupMenuFilter') let buf = RunVimInTerminal('-S XtestPopupMenuFilter', #{rows: 10}) call term_sendkeys(buf, "j") --- 3102,3108 ---- \ filter : 'MyFilter' \ }) END ! call writefile(lines, 'XtestPopupMenuFilter', 'D') let buf = RunVimInTerminal('-S XtestPopupMenuFilter', #{rows: 10}) call term_sendkeys(buf, "j") *************** *** 3164,3170 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPopupMenuFilter') endfunc func Test_popup_cursorline() --- 3124,3129 ---- *************** *** 3204,3210 **** let lines =<< trim END call popup_create(['111', '222', '333'], #{ cursorline : 0 }) END ! call writefile(lines, 'XtestPopupCursorLine') let buf = RunVimInTerminal('-S XtestPopupCursorLine', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_cursorline_1', {}) call term_sendkeys(buf, ":call popup_clear()\") --- 3163,3169 ---- let lines =<< trim END call popup_create(['111', '222', '333'], #{ cursorline : 0 }) END ! call writefile(lines, 'XtestPopupCursorLine', 'D') let buf = RunVimInTerminal('-S XtestPopupCursorLine', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_cursorline_1', {}) call term_sendkeys(buf, ":call popup_clear()\") *************** *** 3296,3303 **** call VerifyScreenDump(buf, 'Test_popupwin_cursorline_7', {}) call StopVimInTerminal(buf) - call delete('XtestPopupCursorLine') - " --------- " Use current buffer for popupmenu " --------- --- 3255,3260 ---- *************** *** 3312,3319 **** let buf = RunVimInTerminal('-S XtestPopupCursorLine', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_cursorline_8', {}) call StopVimInTerminal(buf) - - call delete('XtestPopupCursorLine') endfunc def Test_popup_cursorline_vim9() --- 3269,3274 ---- *************** *** 3333,3349 **** \ "!_TAG_FILE_ENCODING\tutf-8\t//", \ "another\tXtagfile\t/^this is another", \ "theword\tXtagfile\t/^theword"], ! \ 'Xtags') call writefile(range(1,20) \ + ['theword is here'] \ + range(22, 27) \ + ['this is another place'] \ + range(29, 40), ! \ "Xtagfile") call writefile(range(1,10) \ + ['searched word is here'] \ + range(12, 20), ! \ "Xheader.h") let lines =<< trim END set tags=Xtags call setline(1, [ --- 3288,3304 ---- \ "!_TAG_FILE_ENCODING\tutf-8\t//", \ "another\tXtagfile\t/^this is another", \ "theword\tXtagfile\t/^theword"], ! \ 'Xtags', 'D') call writefile(range(1,20) \ + ['theword is here'] \ + range(22, 27) \ + ['this is another place'] \ + range(29, 40), ! \ "Xtagfile", 'D') call writefile(range(1,10) \ + ['searched word is here'] \ + range(12, 20), ! \ "Xheader.h", 'D') let lines =<< trim END set tags=Xtags call setline(1, [ *************** *** 3362,3368 **** hi OtherColor ctermbg=lightcyan guibg=lightcyan set path=. END ! call writefile(lines, 'XtestPreviewPopup') let buf = RunVimInTerminal('-S XtestPreviewPopup', #{rows: 14}) call term_sendkeys(buf, "/theword\\}") --- 3317,3323 ---- hi OtherColor ctermbg=lightcyan guibg=lightcyan set path=. END ! call writefile(lines, 'XtestPreviewPopup', 'D') let buf = RunVimInTerminal('-S XtestPreviewPopup', #{rows: 14}) call term_sendkeys(buf, "/theword\\}") *************** *** 3405,3414 **** call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_10', {}) call StopVimInTerminal(buf) - call delete('Xtags') - call delete('Xtagfile') - call delete('XtestPreviewPopup') - call delete('Xheader.h') endfunc func Get_popupmenu_lines() --- 3360,3365 ---- *************** *** 3545,3551 **** let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,highlight:InfoPopup') ! call writefile(lines, 'XtestInfoPopup') let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14}) call TermWait(buf, 25) --- 3496,3502 ---- let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,highlight:InfoPopup') ! call writefile(lines, 'XtestInfoPopup', 'D') let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14}) call TermWait(buf, 25) *************** *** 3595,3601 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('XtestInfoPopup') endfunc func Test_popupmenu_info_noborder() --- 3546,3551 ---- *************** *** 3604,3610 **** let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,border:off') ! call writefile(lines, 'XtestInfoPopupNb') let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) call TermWait(buf, 25) --- 3554,3560 ---- let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,border:off') ! call writefile(lines, 'XtestInfoPopupNb', 'D') let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) call TermWait(buf, 25) *************** *** 3613,3619 **** call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {}) call StopVimInTerminal(buf) - call delete('XtestInfoPopupNb') endfunc func Test_popupmenu_info_align_menu() --- 3563,3568 ---- *************** *** 3622,3628 **** let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,border:off,align:menu') ! call writefile(lines, 'XtestInfoPopupNb') let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) call TermWait(buf, 25) --- 3571,3577 ---- let lines = Get_popupmenu_lines() call add(lines, 'set completepopup=height:4,border:off,align:menu') ! call writefile(lines, 'XtestInfoPopupNb', 'D') let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) call TermWait(buf, 25) *************** *** 3644,3650 **** call VerifyScreenDump(buf, 'Test_popupwin_infopopup_align_3', {}) call StopVimInTerminal(buf) - call delete('XtestInfoPopupNb') endfunc func Test_popupmenu_info_hidden() --- 3593,3598 ---- *************** *** 3653,3659 **** let lines = Get_popupmenu_lines() call add(lines, 'call InfoHidden()') ! call writefile(lines, 'XtestInfoPopupHidden') let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14}) call TermWait(buf, 25) --- 3601,3607 ---- let lines = Get_popupmenu_lines() call add(lines, 'call InfoHidden()') ! call writefile(lines, 'XtestInfoPopupHidden', 'D') let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14}) call TermWait(buf, 25) *************** *** 3669,3675 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('XtestInfoPopupHidden') endfunc func Test_popupmenu_info_too_wide() --- 3617,3622 ---- *************** *** 3712,3718 **** endfunc END ! call writefile(lines, 'XtestInfoPopupWide') let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8}) call TermWait(buf, 25) --- 3659,3665 ---- endfunc END ! call writefile(lines, 'XtestInfoPopupWide', 'D') let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8}) call TermWait(buf, 25) *************** *** 3721,3727 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('XtestInfoPopupWide') endfunc func Test_popupmenu_masking() --- 3668,3673 ---- *************** *** 3732,3738 **** let lines = Get_popupmenu_lines() call add(lines, 'inoremap call OpenOtherPopups()') ! call writefile(lines, 'XtestPopupmenuMasking') let buf = RunVimInTerminal('-S XtestPopupmenuMasking', #{rows: 14}) call TermWait(buf, 25) --- 3678,3684 ---- let lines = Get_popupmenu_lines() call add(lines, 'inoremap call OpenOtherPopups()') ! call writefile(lines, 'XtestPopupmenuMasking', 'D') let buf = RunVimInTerminal('-S XtestPopupmenuMasking', #{rows: 14}) call TermWait(buf, 25) *************** *** 3744,3750 **** call VerifyScreenDump(buf, 'Test_popupwin_popupmenu_masking_2', {}) call StopVimInTerminal(buf) - call delete('XtestPopupmenuMasking') endfunc func Test_popupwin_recycle_bnr() --- 3690,3695 ---- *************** *** 3832,3844 **** call setline(3, 'x你好世界你好世你好世界你好') call popup_create('你好,世界 - 你好,世界xxxxx', #{line: 1, col: 3, maxwidth: 14}) END ! call writefile(lines, 'XtestPopupWide') let buf = RunVimInTerminal('-S XtestPopupWide', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_doublewidth_1', {}) call StopVimInTerminal(buf) - call delete('XtestPopupWide') endfunc func Test_popupwin_sign() --- 3777,3788 ---- call setline(3, 'x你好世界你好世你好世界你好') call popup_create('你好,世界 - 你好,世界xxxxx', #{line: 1, col: 3, maxwidth: 14}) END ! call writefile(lines, 'XtestPopupWide', 'D') let buf = RunVimInTerminal('-S XtestPopupWide', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_doublewidth_1', {}) call StopVimInTerminal(buf) endfunc func Test_popupwin_sign() *************** *** 3878,3884 **** call popup_settext(g:winid, 'a longer line to check the width') endfunc END ! call writefile(lines, 'XtestPopupSign') let buf = RunVimInTerminal('-S XtestPopupSign', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_sign_1', {}) --- 3822,3828 ---- call popup_settext(g:winid, 'a longer line to check the width') endfunc END ! call writefile(lines, 'XtestPopupSign', 'D') let buf = RunVimInTerminal('-S XtestPopupSign', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_sign_1', {}) *************** *** 3888,3894 **** call VerifyScreenDump(buf, 'Test_popupwin_sign_2', {}) call StopVimInTerminal(buf) - call delete('XtestPopupSign') endfunc func Test_popupwin_bufnr() --- 3832,3837 ---- *************** *** 3952,3958 **** call popup_create('test test test test...', {'filter': {-> 0}}) END ! call writefile(lines, 'XtestPopupCtrlC') let buf = RunVimInTerminal('-S XtestPopupCtrlC', #{rows: 10}) --- 3895,3901 ---- call popup_create('test test test test...', {'filter': {-> 0}}) END ! call writefile(lines, 'XtestPopupCtrlC', 'D') let buf = RunVimInTerminal('-S XtestPopupCtrlC', #{rows: 10}) *************** *** 3960,3966 **** call VerifyScreenDump(buf, 'Test_popupwin_ctrl_c', {}) call StopVimInTerminal(buf) - call delete('XtestPopupCtrlC') endfunc func Test_popupwin_filter_close_wrong_name() --- 3903,3908 ---- *************** *** 3969,3975 **** let lines =<< trim END call popup_create('one two three...', {'filter': 'NoSuchFunc'}) END ! call writefile(lines, 'XtestPopupWrongName') let buf = RunVimInTerminal('-S XtestPopupWrongName', #{rows: 10}) --- 3911,3917 ---- let lines =<< trim END call popup_create('one two three...', {'filter': 'NoSuchFunc'}) END ! call writefile(lines, 'XtestPopupWrongName', 'D') let buf = RunVimInTerminal('-S XtestPopupWrongName', #{rows: 10}) *************** *** 3977,3983 **** call VerifyScreenDump(buf, 'Test_popupwin_wrong_name', {}) call StopVimInTerminal(buf) - call delete('XtestPopupWrongName') endfunc func Test_popupwin_filter_close_three_errors() --- 3919,3924 ---- *************** *** 3987,3993 **** set cmdheight=2 call popup_create('one two three...', {'filter': 'filter'}) END ! call writefile(lines, 'XtestPopupThreeErrors') let buf = RunVimInTerminal('-S XtestPopupThreeErrors', #{rows: 10}) --- 3928,3934 ---- set cmdheight=2 call popup_create('one two three...', {'filter': 'filter'}) END ! call writefile(lines, 'XtestPopupThreeErrors', 'D') let buf = RunVimInTerminal('-S XtestPopupThreeErrors', #{rows: 10}) *************** *** 3997,4003 **** call VerifyScreenDump(buf, 'Test_popupwin_three_errors_2', {}) call StopVimInTerminal(buf) - call delete('XtestPopupThreeErrors') endfunc func Test_popupwin_latin1_encoding() --- 3938,3943 ---- *************** *** 4017,4032 **** endwhile echo "Done" END ! call writefile(lines, 'XtestPopupLatin') ! call writefile([repeat("\u3042 ", 120)], 'Xmultibyte') let buf = RunVimInTerminal('-S XtestPopupLatin', #{rows: 10}) call WaitForAssert({-> assert_match('Done', term_getline(buf, 10))}) call term_sendkeys(buf, ":q\") call StopVimInTerminal(buf) - call delete('XtestPopupLatin') - call delete('Xmultibyte') endfunc func Test_popupwin_atcursor_far_right() --- 3957,3970 ---- endwhile echo "Done" END ! call writefile(lines, 'XtestPopupLatin', 'D') ! call writefile([repeat("\u3042 ", 120)], 'Xmultibyte', 'D') let buf = RunVimInTerminal('-S XtestPopupLatin', #{rows: 10}) call WaitForAssert({-> assert_match('Done', term_getline(buf, 10))}) call term_sendkeys(buf, ":q\") call StopVimInTerminal(buf) endfunc func Test_popupwin_atcursor_far_right() *************** *** 4147,4153 **** fixed: false, }) END ! call writefile(lines, 'XtestPropNotVisble') let buf = RunVimInTerminal('-S XtestPropNotVisble', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_prop_not_visible_01', {}) --- 4085,4091 ---- fixed: false, }) END ! call writefile(lines, 'XtestPropNotVisble', 'D') let buf = RunVimInTerminal('-S XtestPropNotVisble', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_prop_not_visible_01', {}) *************** *** 4165,4171 **** " clean up call StopVimInTerminal(buf) - call delete('XtestPropNotVisble') endfunction func Test_bufdel_skips_popupwin_buffer() --- 4103,4108 ---- *** ../vim-9.0.0630/src/testdir/test_popupwin_textprop.vim 2019-11-30 21:40:44.000000000 +0000 --- src/testdir/test_popupwin_textprop.vim 2022-09-30 21:44:35.536455126 +0100 *************** *** 28,34 **** \ close: 'click', \ }) END ! call writefile(lines, 'XtestTextpropPopup') let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_textprop_01', {}) --- 28,34 ---- \ close: 'click', \ }) END ! call writefile(lines, 'XtestTextpropPopup', 'D') let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popup_textprop_01', {}) *************** *** 52,58 **** " clean up call StopVimInTerminal(buf) - call delete('XtestTextpropPopup') endfunc func Test_textprop_popup_corners() --- 52,57 ---- *************** *** 91,97 **** \ padding: [0,1,0,1], \ }) END ! call writefile(lines, 'XtestTextpropPopupCorners') let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {}) --- 90,96 ---- \ padding: [0,1,0,1], \ }) END ! call writefile(lines, 'XtestTextpropPopupCorners', 'D') let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {}) *************** *** 113,119 **** " clean up call StopVimInTerminal(buf) - call delete('XtestTextpropPopupCorners') endfunc func Test_textprop_popup_offsets() --- 112,117 ---- *************** *** 159,165 **** \ padding: [0,1,0,1], \ }) END ! call writefile(lines, 'XtestTextpropPopupOffset') let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {}) --- 157,163 ---- \ padding: [0,1,0,1], \ }) END ! call writefile(lines, 'XtestTextpropPopupOffset', 'D') let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12}) call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {}) *************** *** 169,175 **** " clean up call StopVimInTerminal(buf) - call delete('XtestTextpropPopupOffset') endfunc --- 167,172 ---- *** ../vim-9.0.0630/src/testdir/test_preview.vim 2021-11-15 11:17:44.000000000 +0000 --- src/testdir/test_preview.vim 2022-09-30 21:44:45.392436292 +0100 *************** *** 40,46 **** CheckFeature quickfix filetype on ! call writefile(['/* some C code */'], 'Xpreview.c') help pedit Xpreview.c wincmd P --- 40,46 ---- CheckFeature quickfix filetype on ! call writefile(['/* some C code */'], 'Xpreview.c', 'D') help pedit Xpreview.c wincmd P *************** *** 50,56 **** filetype off close - call delete('Xpreview.c') endfunc func Test_multiple_preview_windows() --- 50,55 ---- *** ../vim-9.0.0630/src/testdir/test_profile.vim 2022-09-08 12:27:58.281556519 +0100 --- src/testdir/test_profile.vim 2022-09-30 21:47:13.904159077 +0100 *************** *** 46,52 **** call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) call map(lines, {k, v -> substitute(v, 'AAA', a:assign, '') }) ! call writefile(lines, 'Xprofile_func.vim') call system(GetVimCommand() \ . ' -es --clean' \ . ' -c "so Xprofile_func.vim"' --- 46,52 ---- call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) call map(lines, {k, v -> substitute(v, 'AAA', a:assign, '') }) ! call writefile(lines, 'Xprofile_func.vim', 'D') call system(GetVimCommand() \ . ' -es --clean' \ . ' -c "so Xprofile_func.vim"' *************** *** 96,102 **** call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[29]) call assert_equal('', lines[30]) - call delete('Xprofile_func.vim') call delete('Xprofile_func.log') endfunc --- 96,101 ---- *************** *** 142,148 **** call map(lines, {k, v -> substitute(v, 'XXX', a:command, '') }) call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) ! call writefile(lines, 'Xprofile_func.vim') call system(GetVimCommand() \ . ' -es -i NONE --noplugin' \ . ' -c "profile start Xprofile_func.log"' --- 141,147 ---- call map(lines, {k, v -> substitute(v, 'XXX', a:command, '') }) call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) ! call writefile(lines, 'Xprofile_func.vim', 'D') call system(GetVimCommand() \ . ' -es -i NONE --noplugin' \ . ' -c "profile start Xprofile_func.log"' *************** *** 214,220 **** call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[55]) call assert_equal('', lines[56]) - call delete('Xprofile_func.vim') call delete('Xprofile_func.log') endfunc --- 213,218 ---- *************** *** 269,275 **** call map(lines, {k, v -> substitute(v, 'XXX', a:command, '') }) call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) ! call writefile(lines, 'Xprofile_func.vim') call system(GetVimCommand() \ . ' -es -i NONE --noplugin' \ . ' -c "profile start Xprofile_func.log"' --- 267,273 ---- call map(lines, {k, v -> substitute(v, 'XXX', a:command, '') }) call map(lines, {k, v -> substitute(v, 'DDD', a:declare, '') }) ! call writefile(lines, 'Xprofile_func.vim', 'D') call system(GetVimCommand() \ . ' -es -i NONE --noplugin' \ . ' -c "profile start Xprofile_func.log"' *************** *** 341,347 **** call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[55]) call assert_equal('', lines[56]) - call delete('Xprofile_func.vim') call delete('Xprofile_func.log') endfunc --- 339,344 ---- *************** *** 356,362 **** call Foo() [CODE] ! call writefile(lines, 'Xprofile_file.vim') call system(GetVimCommandClean() \ . ' -es' \ . ' -c "profile start Xprofile_file.log"' --- 353,359 ---- call Foo() [CODE] ! call writefile(lines, 'Xprofile_file.vim', 'D') call system(GetVimCommandClean() \ . ' -es' \ . ' -c "profile start Xprofile_file.log"' *************** *** 389,395 **** call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12]) call assert_equal('', lines[13]) - call delete('Xprofile_file.vim') call delete('Xprofile_file.log') endfunc --- 386,391 ---- *************** *** 401,407 **** \ ' \bar"', \ ] ! call writefile(lines, 'Xprofile_file.vim') call system(GetVimCommandClean() \ . ' -es' \ . ' -c "profile start Xprofile_file.log"' --- 397,403 ---- \ ' \bar"', \ ] ! call writefile(lines, 'Xprofile_file.vim', 'D') call system(GetVimCommandClean() \ . ' -es' \ . ' -c "profile start Xprofile_file.log"' *************** *** 425,431 **** call assert_equal(' \bar"', lines[9]) call assert_equal('', lines[10]) - call delete('Xprofile_file.vim') call delete('Xprofile_file.log') endfunc --- 421,426 ---- *************** *** 596,602 **** \ 'call Foo()', \ ] ! call writefile(lines, 'Xprofile_file.vim') call system(GetVimCommandClean() \ . ' -es --cmd "set enc=utf-8"' \ . ' -c "profile start Xprofile_file.log"' --- 591,597 ---- \ 'call Foo()', \ ] ! call writefile(lines, 'Xprofile_file.vim', 'D') call system(GetVimCommandClean() \ . ' -es --cmd "set enc=utf-8"' \ . ' -c "profile start Xprofile_file.log"' *************** *** 617,623 **** call assert_match('^\s*\\ \]$', getline(lnum + 4)) bwipe! - call delete('Xprofile_file.vim') call delete('Xprofile_file.log') endfunc --- 612,617 ---- *************** *** 643,649 **** call Foo2() call Foo3() [CODE] ! call writefile(lines, 'Xprofile_file.vim') call system(GetVimCommandClean() . ' -es -c "so Xprofile_file.vim" -c q') call assert_equal(0, v:shell_error) --- 637,643 ---- call Foo2() call Foo3() [CODE] ! call writefile(lines, 'Xprofile_file.vim', 'D') call system(GetVimCommandClean() . ' -es -c "so Xprofile_file.vim" -c q') call assert_equal(0, v:shell_error) *************** *** 662,668 **** call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[16]) call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[21]) - call delete('Xprofile_file.vim') call delete('Xprofile_file.log') endfunc --- 656,661 ---- *************** *** 678,684 **** profdel * call Foo() [CODE] ! call writefile(lines, 'Xprofile_file.vim') call system(GetVimCommandClean() . ' -es -c "so Xprofile_file.vim" -c q') call assert_equal(0, v:shell_error) --- 671,677 ---- profdel * call Foo() [CODE] ! call writefile(lines, 'Xprofile_file.vim', 'D') call system(GetVimCommandClean() . ' -es -c "so Xprofile_file.vim" -c q') call assert_equal(0, v:shell_error) *************** *** 691,697 **** call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[8]) call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[12]) - call delete('Xprofile_file.vim') call delete('Xprofile_file.log') endfunc --- 684,689 ---- *************** *** 702,708 **** let lines =<< trim END profile start XprofileTypedFunc END ! call writefile(lines, 'XtestProfile') let buf = RunVimInTerminal('-S XtestProfile', #{}) call term_sendkeys(buf, ":func DoSomething()\" --- 694,700 ---- let lines =<< trim END profile start XprofileTypedFunc END ! call writefile(lines, 'XtestProfile', 'D') let buf = RunVimInTerminal('-S XtestProfile', #{}) call term_sendkeys(buf, ":func DoSomething()\" *************** *** 718,724 **** " clean up call delete('XprofileTypedFunc') - call delete('XtestProfile') endfunc func Test_vim9_profiling() --- 710,715 ---- *************** *** 734,744 **** prof func Func Func() END ! call writefile(lines, 'Xprofile_crash.vim') call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q') call assert_equal(0, v:shell_error) call assert_true(readfile('Xprofile_crash.log')->len() > 10) ! call delete('Xprofile_crash.vim') call delete('Xprofile_crash.log') endfunc --- 725,735 ---- prof func Func Func() END ! call writefile(lines, 'Xprofile_crash.vim', 'D') call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q') call assert_equal(0, v:shell_error) call assert_true(readfile('Xprofile_crash.log')->len() > 10) ! call delete('Xprofile_crash.log') endfunc *************** *** 760,766 **** One((nr) => Two(nr)) assert_equal(3, total) END ! call writefile(lines, 'Xprofile_nested.vim') call system(GetVimCommandClean() . ' -es -c "so Xprofile_nested.vim" -c q') call assert_equal(0, v:shell_error) --- 751,757 ---- One((nr) => Two(nr)) assert_equal(3, total) END ! call writefile(lines, 'Xprofile_nested.vim', 'D') call system(GetVimCommandClean() . ' -es -c "so Xprofile_nested.vim" -c q') call assert_equal(0, v:shell_error) *************** *** 773,779 **** call assert_match('FUNCTION \d\+_Two().*' \ .. '#Called 3 times.*' \ .. '# 3 \s*[0-9.]\+ total += nr', prof_lines) ! call delete('Xprofile_nested.vim') call delete('Xprofile_nested.log') endfunc --- 764,770 ---- call assert_match('FUNCTION \d\+_Two().*' \ .. '#Called 3 times.*' \ .. '# 3 \s*[0-9.]\+ total += nr', prof_lines) ! call delete('Xprofile_nested.log') endfunc *** ../vim-9.0.0630/src/testdir/test_prompt_buffer.vim 2021-11-25 12:52:47.000000000 +0000 --- src/testdir/test_prompt_buffer.vim 2022-09-30 21:47:29.184131187 +0100 *************** *** 237,243 **** \ done'], #{out_io: 'buffer', out_name: ''}) startinsert END ! eval script->writefile(scriptName) let buf = RunVimInTerminal('-S ' .. scriptName, {}) call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))}) --- 237,243 ---- \ done'], #{out_io: 'buffer', out_name: ''}) startinsert END ! eval script->writefile(scriptName, 'D') let buf = RunVimInTerminal('-S ' .. scriptName, {}) call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))}) *************** *** 250,256 **** call WaitForAssert({-> assert_equal('cmd:testtesttest', term_getline(buf, 1))}) call StopVimInTerminal(buf) - call delete(scriptName) endfunc " vim: shiftwidth=2 sts=2 expandtab --- 250,255 ---- *** ../vim-9.0.0630/src/testdir/test_python3.vim 2022-09-17 21:07:52.107993141 +0100 --- src/testdir/test_python3.vim 2022-09-30 21:48:13.660050572 +0100 *************** *** 4044,4050 **** endfunc call setline(1, repeat([''], 15) + repeat(['from'], 3)) ! eval repeat(['x'], 17)->writefile('Xa.txt') split Xa.txt py3 import vim py3 b = vim.current.buffer --- 4044,4050 ---- endfunc call setline(1, repeat([''], 15) + repeat(['from'], 3)) ! eval repeat(['x'], 17)->writefile('Xa.txt', 'D') split Xa.txt py3 import vim py3 b = vim.current.buffer *************** *** 4052,4058 **** hide py3 b[:] = aaa - call delete('Xa.txt') set fdm& fde& delfunc Fde bwipe! Xa.txt --- 4052,4057 ---- *************** *** 4078,4084 **** norm! Gzb call feedkeys(":call Func()\r", 'n') END ! call writefile(lines, testfile) let rows = 10 let bufnr = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows}) --- 4077,4083 ---- norm! Gzb call feedkeys(":call Func()\r", 'n') END ! call writefile(lines, testfile, 'D') let rows = 10 let bufnr = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows}) *************** *** 4090,4097 **** call term_sendkeys(bufnr, ":qall!\") call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(bufnr)))}) exe bufnr . 'bwipe!' - call delete(testfile) endfunc " vim: shiftwidth=2 sts=2 expandtab --- 4089,4096 ---- call term_sendkeys(bufnr, ":qall!\") call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(bufnr)))}) + exe bufnr . 'bwipe!' endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-9.0.0630/src/version.c 2022-09-30 19:19:00.769677730 +0100 --- src/version.c 2022-09-30 21:53:35.291488135 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 631, /**/ -- hundred-and-one symptoms of being an internet addict: 234. You started college as a chemistry major, and walk out four years later as an Internet provider. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///