To: vim_dev@googlegroups.com Subject: Patch 9.0.0719 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0719 Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible. Files: src/testdir/test_scriptnames.vim, src/testdir/test_search.vim, src/testdir/test_search_stat.vim, src/testdir/test_shell.vim, src/testdir/test_shortpathname.vim, src/testdir/test_signals.vim, src/testdir/test_signs.vim, src/testdir/test_sort.vim, src/testdir/test_source.vim, src/testdir/test_source_utf8.vim, src/testdir/test_spell.vim, src/testdir/test_spell_utf8.vim, src/testdir/test_spellfile.vim, src/testdir/test_startup.vim, src/testdir/test_startup_utf8.vim, src/testdir/test_stat.vim, src/testdir/test_statusline.vim, src/testdir/test_substitute.vim, src/testdir/test_swap.vim, src/testdir/test_syntax.vim, src/testdir/test_system.vim *** ../vim-9.0.0718/src/testdir/test_scriptnames.vim 2022-08-28 18:52:06.671888918 +0100 --- src/testdir/test_scriptnames.vim 2022-10-10 21:45:36.979729278 +0100 *************** *** 1,7 **** " Test for the :scriptnames command func Test_scriptnames() ! call writefile(['let did_load_script = 123'], 'Xscripting') source Xscripting call assert_equal(123, g:did_load_script) --- 1,7 ---- " Test for the :scriptnames command func Test_scriptnames() ! call writefile(['let did_load_script = 123'], 'Xscripting', 'D') source Xscripting call assert_equal(123, g:did_load_script) *************** *** 22,28 **** call assert_equal('Xscripting', expand('%:t')) bwipe - call delete('Xscripting') let msgs = execute('messages') scriptnames --- 22,27 ---- *************** *** 47,53 **** def Xscript_def_func2() enddef END ! call writefile(lines, 'X22script91') source X22script91 let l = getscriptinfo() call assert_match('X22script91$', l[-1].name) --- 46,52 ---- def Xscript_def_func2() enddef END ! call writefile(lines, 'X22script91', 'D') source X22script91 let l = getscriptinfo() call assert_match('X22script91$', l[-1].name) *************** *** 92,99 **** call assert_fails("echo getscriptinfo('foobar')", 'E1206:') call assert_fails("echo getscriptinfo({'sid': []})", 'E745:') - - call delete('X22script91') endfunc " vim: shiftwidth=2 sts=2 expandtab --- 91,96 ---- *** ../vim-9.0.0718/src/testdir/test_search.vim 2022-06-24 20:10:59.000000000 +0100 --- src/testdir/test_search.vim 2022-10-10 21:49:57.159629065 +0100 *************** *** 724,730 **** endif " Prepare buffer text let lines = ['abb vim vim vi', 'vimvivim'] ! call writefile(lines, 'Xsearch.txt') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])}) --- 724,730 ---- endif " Prepare buffer text let lines = ['abb vim vim vi', 'vimvivim'] ! call writefile(lines, 'Xsearch.txt', 'D') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])}) *************** *** 743,751 **** call assert_notequal(a1, a2) call assert_equal(a0, a2) call assert_equal(a1, a3) - " clean up - call delete('Xsearch.txt') bwipe! endfunc --- 743,750 ---- call assert_notequal(a1, a2) call assert_equal(a0, a2) call assert_equal(a1, a3) + " clean up bwipe! endfunc *************** *** 859,865 **** " Prepare buffer text let lines = ['abb vim vim vi', 'vimvivim'] ! call writefile(lines, 'Xsearch.txt') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])}) --- 858,864 ---- " Prepare buffer text let lines = ['abb vim vim vi', 'vimvivim'] ! call writefile(lines, 'Xsearch.txt', 'D') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])}) *************** *** 928,936 **** let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0] call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr')) call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr')) - call delete('Xsearch.txt') - call delete('Xsearch.txt') bwipe! endfunc --- 927,933 ---- *************** *** 956,962 **** \ 'call setline(1, [dots, dots, dots, "", "target", dots, dots])', \ 'normal gg', \ 'redraw', ! \ ], 'Xscript') let buf = RunVimInTerminal('-S Xscript', {'rows': 9, 'cols': 70}) " Need to send one key at a time to force a redraw call term_sendkeys(buf, '/') --- 953,959 ---- \ 'call setline(1, [dots, dots, dots, "", "target", dots, dots])', \ 'normal gg', \ 'redraw', ! \ ], 'Xscript', 'D') let buf = RunVimInTerminal('-S Xscript', {'rows': 9, 'cols': 70}) " Need to send one key at a time to force a redraw call term_sendkeys(buf, '/') *************** *** 972,978 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xscript') endfunc func Test_incsearch_search_dump() --- 969,974 ---- *************** *** 985,991 **** \ ' call setline(n, "foo " . n)', \ 'endfor', \ '3', ! \ ], 'Xis_search_script') let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 981,987 ---- \ ' call setline(n, "foo " . n)', \ 'endfor', \ '3', ! \ ], 'Xis_search_script', 'D') let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1002,1008 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xis_search_script') endfunc func Test_hlsearch_dump() --- 998,1003 ---- *************** *** 1014,1020 **** \ 'call setline(1, ["xxx", "xxx", "xxx"])', \ '/.*', \ '2', ! \ ], 'Xhlsearch_script') let buf = RunVimInTerminal('-S Xhlsearch_script', {'rows': 6, 'cols': 50}) call VerifyScreenDump(buf, 'Test_hlsearch_1', {}) --- 1009,1015 ---- \ 'call setline(1, ["xxx", "xxx", "xxx"])', \ '/.*', \ '2', ! \ ], 'Xhlsearch_script', 'D') let buf = RunVimInTerminal('-S Xhlsearch_script', {'rows': 6, 'cols': 50}) call VerifyScreenDump(buf, 'Test_hlsearch_1', {}) *************** *** 1022,1028 **** call VerifyScreenDump(buf, 'Test_hlsearch_2', {}) call StopVimInTerminal(buf) - call delete('Xhlsearch_script') endfunc func Test_hlsearch_and_visual() --- 1017,1022 ---- *************** *** 1035,1048 **** \ 'hi Search cterm=bold', \ '/yyy', \ 'call cursor(1, 6)', ! \ ], 'Xhlvisual_script') let buf = RunVimInTerminal('-S Xhlvisual_script', {'rows': 6, 'cols': 40}) call term_sendkeys(buf, "vjj") call VerifyScreenDump(buf, 'Test_hlsearch_visual_1', {}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xhlvisual_script') endfunc func Test_hlsearch_block_visual_match() --- 1029,1041 ---- \ 'hi Search cterm=bold', \ '/yyy', \ 'call cursor(1, 6)', ! \ ], 'Xhlvisual_script', 'D') let buf = RunVimInTerminal('-S Xhlvisual_script', {'rows': 6, 'cols': 40}) call term_sendkeys(buf, "vjj") call VerifyScreenDump(buf, 'Test_hlsearch_visual_1', {}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf) endfunc func Test_hlsearch_block_visual_match() *************** *** 1052,1058 **** set hlsearch call setline(1, ['aa', 'bbbb', 'cccccc']) END ! call writefile(lines, 'Xhlsearch_block') let buf = RunVimInTerminal('-S Xhlsearch_block', {'rows': 9, 'cols': 60}) call term_sendkeys(buf, "G\$kk\") --- 1045,1051 ---- set hlsearch call setline(1, ['aa', 'bbbb', 'cccccc']) END ! call writefile(lines, 'Xhlsearch_block', 'D') let buf = RunVimInTerminal('-S Xhlsearch_block', {'rows': 9, 'cols': 60}) call term_sendkeys(buf, "G\$kk\") *************** *** 1062,1068 **** call VerifyScreenDump(buf, 'Test_hlsearch_block_visual_match', {}) call StopVimInTerminal(buf) - call delete('Xhlsearch_block') endfunc func Test_incsearch_substitute() --- 1055,1060 ---- *************** *** 1108,1114 **** hi Search ctermbg=yellow hi CurSearch ctermbg=blue END ! call writefile(lines, 'Xhlsearch_cursearch') let buf = RunVimInTerminal('-S Xhlsearch_cursearch', {'rows': 9, 'cols': 60}) call term_sendkeys(buf, "gg/foo\") --- 1100,1106 ---- hi Search ctermbg=yellow hi CurSearch ctermbg=blue END ! call writefile(lines, 'Xhlsearch_cursearch', 'D') let buf = RunVimInTerminal('-S Xhlsearch_cursearch', {'rows': 9, 'cols': 60}) call term_sendkeys(buf, "gg/foo\") *************** *** 1146,1152 **** call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_changed_1', {}) call StopVimInTerminal(buf) - call delete('Xhlsearch_cursearch') endfunc " Similar to Test_incsearch_substitute() but with a screendump halfway. --- 1138,1143 ---- *************** *** 1161,1167 **** \ 'endfor', \ 'call setline(11, "bar 11")', \ '3', ! \ ], 'Xis_subst_script') let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 1152,1158 ---- \ 'endfor', \ 'call setline(11, "bar 11")', \ '3', ! \ ], 'Xis_subst_script', 'D') let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1256,1262 **** call term_sendkeys(buf, "") call StopVimInTerminal(buf) - call delete('Xis_subst_script') endfunc func Test_incsearch_highlighting() --- 1247,1252 ---- *************** *** 1266,1272 **** call writefile([ \ 'set incsearch hlsearch', \ 'call setline(1, "hello/there")', ! \ ], 'Xis_subst_hl_script') let buf = RunVimInTerminal('-S Xis_subst_hl_script', {'rows': 4, 'cols': 20}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 1256,1262 ---- call writefile([ \ 'set incsearch hlsearch', \ 'call setline(1, "hello/there")', ! \ ], 'Xis_subst_hl_script', 'D') let buf = RunVimInTerminal('-S Xis_subst_hl_script', {'rows': 4, 'cols': 20}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1279,1285 **** call term_sendkeys(buf, "") call StopVimInTerminal(buf) - call delete('Xis_subst_hl_script') endfunc func Test_incsearch_with_change() --- 1269,1274 ---- *************** *** 1291,1297 **** \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["one", "two ------ X", "three"])', \ 'call timer_start(200, { _ -> setline(2, "x")})', ! \ ], 'Xis_change_script') let buf = RunVimInTerminal('-S Xis_change_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 1280,1286 ---- \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["one", "two ------ X", "three"])', \ 'call timer_start(200, { _ -> setline(2, "x")})', ! \ ], 'Xis_change_script', 'D') let buf = RunVimInTerminal('-S Xis_change_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1303,1309 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xis_change_script') endfunc " Similar to Test_incsearch_substitute_dump() for :sort --- 1292,1297 ---- *************** *** 1314,1320 **** call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ! \ ], 'Xis_sort_script') let buf = RunVimInTerminal('-S Xis_sort_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 1302,1308 ---- call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ! \ ], 'Xis_sort_script', 'D') let buf = RunVimInTerminal('-S Xis_sort_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1329,1335 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xis_sort_script') endfunc " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry --- 1317,1322 ---- *************** *** 1340,1346 **** call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ! \ ], 'Xis_vimgrep_script') let buf = RunVimInTerminal('-S Xis_vimgrep_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. --- 1327,1333 ---- call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ! \ ], 'Xis_vimgrep_script', 'D') let buf = RunVimInTerminal('-S Xis_vimgrep_script', {'rows': 9, 'cols': 70}) " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by " the 'ambiwidth' check. *************** *** 1368,1374 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xis_vimgrep_script') endfunc func Test_keep_last_search_pattern() --- 1355,1360 ---- *************** *** 1492,1502 **** func Test_no_last_substitute_pat() " Use viminfo to set the last search pattern to a string and make the last " substitute pattern the most recent used and make it empty (NULL). ! call writefile(['~MSle0/bar', '~MSle0~&'], 'Xviminfo') rviminfo! Xviminfo call assert_fails('normal n', 'E35:') - - call delete('Xviminfo') endfunc func Test_search_Ctrl_L_combining() --- 1478,1486 ---- func Test_no_last_substitute_pat() " Use viminfo to set the last search pattern to a string and make the last " substitute pattern the most recent used and make it empty (NULL). ! call writefile(['~MSle0/bar', '~MSle0~&'], 'Xviminfo', 'D') rviminfo! Xviminfo call assert_fails('normal n', 'E35:') endfunc func Test_search_Ctrl_L_combining() *************** *** 1739,1750 **** call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif - call delete('Xscript') call delete('Xresult') endfunc --- 1723,1733 ---- call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif call delete('Xresult') endfunc *************** *** 1762,1772 **** call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif - call delete('Xscript') call delete('Xresult') endfunc --- 1745,1754 ---- call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif call delete('Xresult') endfunc *************** *** 2012,2018 **** set incsearch nohls call setline(1, ['test', 'xxx']) [CODE] ! call writefile(commands, 'Xincsearch_nl') let buf = RunVimInTerminal('-S Xincsearch_nl', {'rows': 5, 'cols': 10}) call term_sendkeys(buf, '/test') call VerifyScreenDump(buf, 'Test_incsearch_newline1', {}) --- 1994,2000 ---- set incsearch nohls call setline(1, ['test', 'xxx']) [CODE] ! call writefile(commands, 'Xincsearch_nl', 'D') let buf = RunVimInTerminal('-S Xincsearch_nl', {'rows': 5, 'cols': 10}) call term_sendkeys(buf, '/test') call VerifyScreenDump(buf, 'Test_incsearch_newline1', {}) *************** *** 2028,2034 **** call StopVimInTerminal(buf) " clean up - call delete('Xincsearch_nl') call test_override("char_avail", 0) bw endfunc --- 2010,2015 ---- *************** *** 2044,2050 **** \ 'endfor', \ 'call setline(5, "abc|def")', \ '3', ! \ ], 'Xis_subst_script2') let buf = RunVimInTerminal('-S Xis_subst_script2', {'rows': 9, 'cols': 70}) call term_sendkeys(buf, ':%s/\vabc|') --- 2025,2031 ---- \ 'endfor', \ 'call setline(5, "abc|def")', \ '3', ! \ ], 'Xis_subst_script2', 'D') let buf = RunVimInTerminal('-S Xis_subst_script2', {'rows': 9, 'cols': 70}) call term_sendkeys(buf, ':%s/\vabc|') *************** *** 2059,2065 **** call StopVimInTerminal(buf) - call delete('Xis_subst_script2') endfunc func Test_pattern_is_uppercase_smartcase() --- 2040,2045 ---- *************** *** 2146,2156 **** 5/ c END ! call writefile(lines, 'Xrangesearch') source Xrangesearch bwipe! - call delete('Xrangesearch') endfunc --- 2126,2135 ---- 5/ c END ! call writefile(lines, 'Xrangesearch', 'D') source Xrangesearch bwipe! endfunc *** ../vim-9.0.0718/src/testdir/test_search_stat.vim 2022-08-30 19:48:17.206760205 +0100 --- src/testdir/test_search_stat.vim 2022-10-10 21:50:49.899608757 +0100 *************** *** 287,293 **** set hlsearch set laststatus=2 statusline+=%{TestSearchCount()} END ! call writefile(lines, 'Xsearchstatusline') let buf = RunVimInTerminal('-S Xsearchstatusline', #{rows: 10}) call TermWait(buf) call term_sendkeys(buf, "/something") --- 287,293 ---- set hlsearch set laststatus=2 statusline+=%{TestSearchCount()} END ! call writefile(lines, 'Xsearchstatusline', 'D') let buf = RunVimInTerminal('-S Xsearchstatusline', #{rows: 10}) call TermWait(buf) call term_sendkeys(buf, "/something") *************** *** 295,301 **** call term_sendkeys(buf, "\") call StopVimInTerminal(buf) - call delete('Xsearchstatusline') endfunc func Test_search_stat_foldopen() --- 295,300 ---- *************** *** 309,315 **** call cursor(1,1) norm n END ! call writefile(lines, 'Xsearchstat1') let buf = RunVimInTerminal('-S Xsearchstat1', #{rows: 10}) call VerifyScreenDump(buf, 'Test_searchstat_3', {}) --- 308,314 ---- call cursor(1,1) norm n END ! call writefile(lines, 'Xsearchstat1', 'D') let buf = RunVimInTerminal('-S Xsearchstat1', #{rows: 10}) call VerifyScreenDump(buf, 'Test_searchstat_3', {}) *************** *** 321,327 **** call VerifyScreenDump(buf, 'Test_searchstat_3', {}) call StopVimInTerminal(buf) - call delete('Xsearchstat1') endfunc func! Test_search_stat_screendump() --- 320,325 ---- *************** *** 338,344 **** call cursor(1,1) norm n END ! call writefile(lines, 'Xsearchstat') let buf = RunVimInTerminal('-S Xsearchstat', #{rows: 10}) call VerifyScreenDump(buf, 'Test_searchstat_1', {}) --- 336,342 ---- call cursor(1,1) norm n END ! call writefile(lines, 'Xsearchstat', 'D') let buf = RunVimInTerminal('-S Xsearchstat', #{rows: 10}) call VerifyScreenDump(buf, 'Test_searchstat_1', {}) *************** *** 347,353 **** call VerifyScreenDump(buf, 'Test_searchstat_2', {}) call StopVimInTerminal(buf) - call delete('Xsearchstat') endfunc func Test_search_stat_then_gd() --- 345,350 ---- *************** *** 358,364 **** set shortmess-=S set hlsearch END ! call writefile(lines, 'Xsearchstatgd') let buf = RunVimInTerminal('-S Xsearchstatgd', #{rows: 10}) call term_sendkeys(buf, "/dog\") --- 355,361 ---- set shortmess-=S set hlsearch END ! call writefile(lines, 'Xsearchstatgd', 'D') let buf = RunVimInTerminal('-S Xsearchstatgd', #{rows: 10}) call term_sendkeys(buf, "/dog\") *************** *** 368,374 **** call VerifyScreenDump(buf, 'Test_searchstatgd_2', {}) call StopVimInTerminal(buf) - call delete('Xsearchstatgd') endfunc func Test_search_stat_and_incsearch() --- 365,370 ---- *************** *** 392,398 **** set tabline=%!MyTabLine() END ! call writefile(lines, 'Xsearchstat_inc') let buf = RunVimInTerminal('-S Xsearchstat_inc', #{rows: 10}) call term_sendkeys(buf, "/abc") --- 388,394 ---- set tabline=%!MyTabLine() END ! call writefile(lines, 'Xsearchstat_inc', 'D') let buf = RunVimInTerminal('-S Xsearchstat_inc', #{rows: 10}) call term_sendkeys(buf, "/abc") *************** *** 411,417 **** call TermWait(buf) call StopVimInTerminal(buf) - call delete('Xsearchstat_inc') endfunc --- 407,412 ---- *** ../vim-9.0.0718/src/testdir/test_shell.vim 2022-10-03 16:05:25.021469286 +0100 --- src/testdir/test_shell.vim 2022-10-10 22:31:40.024619018 +0100 *************** *** 202,208 **** let save_sxq = &shellxquote let save_sxe = &shellxescape ! call writefile(['#!/bin/sh', 'echo "Cmd: [$*]" > Xlog'], 'Xtestshell') call setfperm('Xtestshell', "r-x------") set shell=./Xtestshell --- 202,208 ---- let save_sxq = &shellxquote let save_sxe = &shellxescape ! call writefile(['#!/bin/sh', 'echo "Cmd: [$*]" > Xlog'], 'Xtestshell', 'D') call setfperm('Xtestshell', "r-x------") set shell=./Xtestshell *************** *** 226,232 **** let &shell = save_shell let &shellxquote = save_sxq let &shellxescape = save_sxe - call delete('Xtestshell') call delete('Xlog') endfunc --- 226,231 ---- *** ../vim-9.0.0718/src/testdir/test_shortpathname.vim 2022-07-30 15:35:08.329140430 +0100 --- src/testdir/test_shortpathname.vim 2022-10-10 21:52:42.207086888 +0100 *************** *** 42,48 **** let file2 = dir2 . '/z.txt' let nofile2 = dir2 . '/zz.txt' ! call mkdir(dir1) let resdir1 = substitute(fnamemodify(dir1, ':p:8'), '/$', '', '') call assert_match('\V\^c:/XX\x\x\x\x~1.Y\$', resdir1) --- 42,48 ---- let file2 = dir2 . '/z.txt' let nofile2 = dir2 . '/zz.txt' ! call mkdir(dir1, 'D') let resdir1 = substitute(fnamemodify(dir1, ':p:8'), '/$', '', '') call assert_match('\V\^c:/XX\x\x\x\x~1.Y\$', resdir1) *************** *** 52,60 **** let resfile2 = resdir2 . '/z.txt' let resnofile2 = resdir2 . '/zz.txt' ! call mkdir(dir2) ! call writefile([], file1) ! call writefile([], file2) call TestIt(file1, ':p:8', resfile1) call TestIt(nofile1, ':p:8', resnofile1) --- 52,60 ---- let resfile2 = resdir2 . '/z.txt' let resnofile2 = resdir2 . '/zz.txt' ! call mkdir(dir2, 'D') ! call writefile([], file1, 'D') ! call writefile([], file2, 'D') call TestIt(file1, ':p:8', resfile1) call TestIt(nofile1, ':p:8', resnofile1) *************** *** 73,82 **** call TestIt(nofile2, ':~:8', '~' . strpart(resnofile2, strlen(resdir1))) cd c:/ - call delete(file2) - call delete(file1) - call delete(dir2, 'd') - call delete(dir1, 'd') call chdir(save_dir) endfunc --- 73,78 ---- *************** *** 86,101 **** let file = dir . '/日本語のファイル.txt' ! call mkdir(dir) ! call writefile([], file) let sfile = fnamemodify(file, ':8') call assert_notequal(file, sfile) call assert_match('\~', sfile) - - call delete(file) - call delete(dir, 'd') endfunc func Test_ColonEight_notexists() --- 82,94 ---- let file = dir . '/日本語のファイル.txt' ! call mkdir(dir, 'D') ! call writefile([], file, 'D') let sfile = fnamemodify(file, ':8') call assert_notequal(file, sfile) call assert_match('\~', sfile) endfunc func Test_ColonEight_notexists() *** ../vim-9.0.0718/src/testdir/test_signals.vim 2022-09-06 10:56:15.605981108 +0100 --- src/testdir/test_signals.vim 2022-10-10 21:53:32.262470561 +0100 *************** *** 117,123 **** au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut1", "as") au VimResume * call writefile(["VimResume triggered"], "XautoOut2", "as") END ! call writefile(lines, 'XsetupAucmd') let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) let pid_vim = term_getjob(buf)->job_info().process --- 117,123 ---- au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut1", "as") au VimResume * call writefile(["VimResume triggered"], "XautoOut2", "as") END ! call writefile(lines, 'XsetupAucmd', 'D') let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) let pid_vim = term_getjob(buf)->job_info().process *************** *** 147,153 **** %bwipe! call delete('.Xsig_TERM.swp') - call delete('XsetupAucmd') call delete('XautoOut1') call delete('XautoOut2') endfunc --- 147,152 ---- *************** *** 176,182 **** au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as") au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as") END ! call writefile(lines, 'XsetupAucmd') let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) let pid_vim = term_getjob(buf)->job_info().process --- 175,181 ---- au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as") au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as") END ! call writefile(lines, 'XsetupAucmd', 'D') let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) let pid_vim = term_getjob(buf)->job_info().process *************** *** 200,206 **** %bwipe! call delete('.Xsig_TERM.swp') - call delete('XsetupAucmd') call delete('XautoOut') endfunc --- 199,204 ---- *** ../vim-9.0.0718/src/testdir/test_signs.vim 2022-09-21 11:21:53.282431881 +0100 --- src/testdir/test_signs.vim 2022-10-10 21:56:10.672811409 +0100 *************** *** 248,255 **** \ 'SpellLocal SpellRare', @:) endfor ! call writefile(repeat(["Sun is shining"], 30), "XsignOne") ! call writefile(repeat(["Sky is blue"], 30), "XsignTwo") call feedkeys(":sign define Sign icon=Xsig\\\"\", 'tx') call assert_equal('"sign define Sign icon=XsignOne XsignTwo', @:) --- 248,255 ---- \ 'SpellLocal SpellRare', @:) endfor ! call writefile(repeat(["Sun is shining"], 30), "XsignOne", 'D') ! call writefile(repeat(["Sky is blue"], 30), "XsignTwo", 'D') call feedkeys(":sign define Sign icon=Xsig\\\"\", 'tx') call assert_equal('"sign define Sign icon=XsignOne XsignTwo', @:) *************** *** 326,333 **** sign undefine Sign1 sign undefine Sign2 enew - call delete('XsignOne') - call delete('XsignTwo') endfunc func Test_sign_invalid_commands() --- 326,331 ---- *************** *** 470,476 **** call assert_fails('call sign_getdefined({})', 'E731:') " Tests for sign_place() ! call writefile(repeat(["Sun is shining"], 30), "Xsign") edit Xsign call assert_equal(10, sign_place(10, '', 'sign1', 'Xsign', --- 468,474 ---- call assert_fails('call sign_getdefined({})', 'E731:') " Tests for sign_place() ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') edit Xsign call assert_equal(10, sign_place(10, '', 'sign1', 'Xsign', *************** *** 576,582 **** \ 'priority' : 10}]}], \ sign_getplaced('%', {'lnum' : 22})) - call delete("Xsign") call sign_unplace('*') call sign_undefine() enew | only --- 574,579 ---- *************** *** 589,595 **** call sign_unplace('*') call sign_undefine() ! call writefile(repeat(["Sun is shining"], 30), "Xsign") let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call assert_equal(0, sign_define("sign1", attr)) --- 586,592 ---- call sign_unplace('*') call sign_undefine() ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call assert_equal(0, sign_define("sign1", attr)) *************** *** 829,835 **** " Error cases call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:') - call delete("Xsign") call sign_unplace('*') call sign_undefine() enew | only --- 826,831 ---- *************** *** 872,879 **** call sign_undefine() " Create two files and define signs ! call writefile(repeat(["Sun is shining"], 30), "Xsign1") ! call writefile(repeat(["It is beautiful"], 30), "Xsign2") let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call sign_define("sign1", attr) --- 868,875 ---- call sign_undefine() " Create two files and define signs ! call writefile(repeat(["Sun is shining"], 30), "Xsign1", 'D') ! call writefile(repeat(["It is beautiful"], 30), "Xsign2", 'D') let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call sign_define("sign1", attr) *************** *** 1182,1189 **** call sign_unplace('*') call sign_undefine() enew | only - call delete("Xsign1") - call delete("Xsign2") endfunc " Tests for auto-generating the sign identifier. --- 1178,1183 ---- *************** *** 1195,1201 **** let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call assert_equal(0, sign_define("sign1", attr)) ! call writefile(repeat(["Sun is shining"], 30), "Xsign") edit Xsign call assert_equal(1, sign_place(0, '', 'sign1', 'Xsign', --- 1189,1195 ---- let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'} call assert_equal(0, sign_define("sign1", attr)) ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') edit Xsign call assert_equal(1, sign_place(0, '', 'sign1', 'Xsign', *************** *** 1217,1223 **** call assert_equal(10, \ sign_getplaced('Xsign', {'id' : 1})[0].signs[0].lnum) - call delete("Xsign") call sign_unplace('*') call sign_undefine() enew | only --- 1211,1216 ---- *************** *** 1235,1241 **** call sign_define("sign3", attr) " Place three signs with different priority in the same line ! call writefile(repeat(["Sun is shining"], 30), "Xsign") edit Xsign call sign_place(1, 'g1', 'sign1', 'Xsign', --- 1228,1234 ---- call sign_define("sign3", attr) " Place three signs with different priority in the same line ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') edit Xsign call sign_place(1, 'g1', 'sign1', 'Xsign', *************** *** 1590,1601 **** call sign_unplace('*') call sign_undefine() enew | only - call delete("Xsign") endfunc " Tests for memory allocation failures in sign functions func Test_sign_memfailures() ! call writefile(repeat(["Sun is shining"], 30), "Xsign") edit Xsign call test_alloc_fail(GetAllocId('sign_getdefined'), 0, 0) --- 1583,1593 ---- call sign_unplace('*') call sign_undefine() enew | only endfunc " Tests for memory allocation failures in sign functions func Test_sign_memfailures() ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') edit Xsign call test_alloc_fail(GetAllocId('sign_getdefined'), 0, 0) *************** *** 1632,1638 **** call sign_unplace('*') call sign_undefine() enew | only - call delete("Xsign") endfunc " Test for auto-adjusting the line number of a placed sign. --- 1624,1629 ---- *************** *** 1789,1795 **** redraw sign place 10 line=2 name=s1 END ! call writefile(lines, 'XtestSigncolumn') let buf = RunVimInTerminal('-S XtestSigncolumn', {'rows': 6}) call VerifyScreenDump(buf, 'Test_sign_cursor_1', {}) --- 1780,1786 ---- redraw sign place 10 line=2 name=s1 END ! call writefile(lines, 'XtestSigncolumn', 'D') let buf = RunVimInTerminal('-S XtestSigncolumn', {'rows': 6}) call VerifyScreenDump(buf, 'Test_sign_cursor_1', {}) *************** *** 1823,1829 **** " clean up call StopVimInTerminal(buf) - call delete('XtestSigncolumn') endfunc " Return the 'len' characters in screen starting from (row,col) --- 1814,1819 ---- *************** *** 1942,1948 **** " Test for managing multiple signs using the sign functions func Test_sign_funcs_multi() ! call writefile(repeat(["Sun is shining"], 30), "Xsign") edit Xsign let bnum = bufnr('') --- 1932,1938 ---- " Test for managing multiple signs using the sign functions func Test_sign_funcs_multi() ! call writefile(repeat(["Sun is shining"], 30), "Xsign", 'D') edit Xsign let bnum = bufnr('') *************** *** 2054,2060 **** call sign_unplace('*') call sign_undefine() enew! - call delete("Xsign") endfunc func Test_sign_null_list() --- 2044,2049 ---- *** ../vim-9.0.0718/src/testdir/test_sort.vim 2022-09-17 21:07:52.107993141 +0100 --- src/testdir/test_sort.vim 2022-10-10 21:56:49.040466289 +0100 *************** *** 1520,1530 **** call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif - call delete('Xscript') call delete('Xresult') endfunc --- 1520,1529 ---- call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif call delete('Xresult') endfunc *** ../vim-9.0.0718/src/testdir/test_source.vim 2022-09-28 10:45:11.709718298 +0100 --- src/testdir/test_source.vim 2022-10-10 21:58:12.783776835 +0100 *************** *** 51,62 **** " When deleting a file and immediately creating a new one the inode may be " recycled. Vim should not recognize it as the same script. func Test_different_script() ! call writefile(['let s:var = "asdf"'], 'XoneScript') source XoneScript ! call delete('XoneScript') ! call writefile(['let g:var = s:var'], 'XtwoScript') call assert_fails('source XtwoScript', 'E121:') - call delete('XtwoScript') endfunc " When sourcing a vim script, shebang should be ignored. --- 51,60 ---- " When deleting a file and immediately creating a new one the inode may be " recycled. Vim should not recognize it as the same script. func Test_different_script() ! call writefile(['let s:var = "asdf"'], 'XoneScript', 'D') source XoneScript ! call writefile(['let g:var = s:var'], 'XtwoScript', 'D') call assert_fails('source XtwoScript', 'E121:') endfunc " When sourcing a vim script, shebang should be ignored. *** ../vim-9.0.0718/src/testdir/test_source_utf8.vim 2020-08-12 17:43:41.000000000 +0100 --- src/testdir/test_source_utf8.vim 2022-10-10 21:58:29.639647725 +0100 *************** *** 43,49 **** \ "map __3 asd\\", \ "map __4 asd\\\", \ "map __5 asd\\\", ! \ ], 'Xtestfile') source Xtestfile enew! exe "normal __1\\__2\__3\\__4\__5\" --- 43,49 ---- \ "map __3 asd\\", \ "map __4 asd\\\", \ "map __5 asd\\\", ! \ ], 'Xtestfile', 'D') source Xtestfile enew! exe "normal __1\\__2\__3\\__4\__5\" *************** *** 53,59 **** \ getline(1, 2)) enew! - call delete('Xtestfile') unmap __1 unmap __2 unmap __3 --- 53,58 ---- *** ../vim-9.0.0718/src/testdir/test_spell.vim 2022-10-05 13:28:53.957039865 +0100 --- src/testdir/test_spell.vim 2022-10-10 22:34:09.860279158 +0100 *************** *** 762,769 **** func Test_zz_sal_and_addition() set enc=latin1 set spellfile= ! call writefile(g:test_data_dic1, "Xtest.dic") ! call writefile(g:test_data_aff_sal, "Xtest.aff") mkspell! Xtest Xtest set spl=Xtest.latin1.spl spell call assert_equal('kbltykk', soundfold('goobledygoook')) --- 762,769 ---- func Test_zz_sal_and_addition() set enc=latin1 set spellfile= ! call writefile(g:test_data_dic1, "Xtest.dic", 'D') ! call writefile(g:test_data_aff_sal, "Xtest.aff", 'D') mkspell! Xtest Xtest set spl=Xtest.latin1.spl spell call assert_equal('kbltykk', soundfold('goobledygoook')) *************** *** 771,777 **** call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) "also use an addition file ! call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.latin1.add") mkspell! Xtest.latin1.add.spl Xtest.latin1.add bwipe! --- 771,777 ---- call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) "also use an addition file ! call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.latin1.add", 'D') mkspell! Xtest.latin1.add.spl Xtest.latin1.add bwipe! *************** *** 808,817 **** func Test_region_error() messages clear ! call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add") mkspell! Xtest.latin1.add.spl Xtest.latin1.add call assert_match('Invalid region nr in Xtest.latin1.add line 2: 0', execute('messages')) - call delete('Xtest.latin1.add') call delete('Xtest.latin1.add.spl') endfunc --- 808,816 ---- func Test_region_error() messages clear ! call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add", 'D') mkspell! Xtest.latin1.add.spl Xtest.latin1.add call assert_match('Invalid region nr in Xtest.latin1.add line 2: 0', execute('messages')) call delete('Xtest.latin1.add.spl') endfunc *** ../vim-9.0.0718/src/testdir/test_spell_utf8.vim 2022-07-30 11:39:52.398622432 +0100 --- src/testdir/test_spell_utf8.vim 2022-10-10 22:01:17.206512522 +0100 *************** *** 726,733 **** " Test with SAL instead of SOFO items; test automatic reloading func Test_spell_sal_and_addition() set spellfile= ! call writefile(g:test_data_dic1, "Xtest.dic") ! call writefile(g:test_data_aff_sal, "Xtest.aff") mkspell! Xtest Xtest set spl=Xtest.utf-8.spl spell call assert_equal('kbltykk', soundfold('goobledygoook')) --- 726,733 ---- " Test with SAL instead of SOFO items; test automatic reloading func Test_spell_sal_and_addition() set spellfile= ! call writefile(g:test_data_dic1, "Xtest.dic", 'D') ! call writefile(g:test_data_aff_sal, "Xtest.aff", 'D') mkspell! Xtest Xtest set spl=Xtest.utf-8.spl spell call assert_equal('kbltykk', soundfold('goobledygoook')) *************** *** 735,741 **** call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) "also use an addition file ! call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.utf-8.add") mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add bwipe! --- 735,741 ---- call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) "also use an addition file ! call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.utf-8.add", 'D') mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add bwipe! *** ../vim-9.0.0718/src/testdir/test_spellfile.vim 2022-08-21 20:33:44.157711380 +0100 --- src/testdir/test_spellfile.vim 2022-10-10 22:06:48.844842817 +0100 *************** *** 212,218 **** " The spell file format is described in spellfile.c func Test_spellfile_format_error() let save_rtp = &rtp ! call mkdir('Xtest/spell', 'p') let splfile = './Xtest/spell/Xtest.utf-8.spl' " empty spell file --- 212,218 ---- " The spell file format is described in spellfile.c func Test_spellfile_format_error() let save_rtp = &rtp ! call mkdir('Xtest/spell', 'pR') let splfile = './Xtest/spell/Xtest.utf-8.spl' " empty spell file *************** *** 384,396 **** call Spellfile_Test(0zFF00000000000000000000000201010000, 'E759:') let &rtp = save_rtp - call delete('Xtest', 'rf') endfunc " Test for format errors in suggest file func Test_sugfile_format_error() let save_rtp = &rtp ! call mkdir('Xtest/spell', 'p') let splfile = './Xtest/spell/Xtest.utf-8.spl' let sugfile = './Xtest/spell/Xtest.utf-8.sug' --- 384,395 ---- call Spellfile_Test(0zFF00000000000000000000000201010000, 'E759:') let &rtp = save_rtp endfunc " Test for format errors in suggest file func Test_sugfile_format_error() let save_rtp = &rtp ! call mkdir('Xtest/spell', 'pR') let splfile = './Xtest/spell/Xtest.utf-8.spl' let sugfile = './Xtest/spell/Xtest.utf-8.sug' *************** *** 473,479 **** set nospell spelllang& let &rtp = save_rtp - call delete('Xtest', 'rf') endfunc " Test for using :mkspell to create a spell file from a list of words --- 472,477 ---- *************** *** 486,492 **** /encoding=latin1 example [END] ! call writefile(lines, 'Xwordlist.dic') let output = execute('mkspell Xwordlist.spl Xwordlist.dic') call assert_match('Duplicate /encoding= line ignored in Xwordlist.dic line 4: /encoding=latin1', output) --- 484,490 ---- /encoding=latin1 example [END] ! call writefile(lines, 'Xwordlist.dic', 'D') let output = execute('mkspell Xwordlist.spl Xwordlist.dic') call assert_match('Duplicate /encoding= line ignored in Xwordlist.dic line 4: /encoding=latin1', output) *************** *** 559,565 **** call assert_match('Compressed keep-case:', output) call delete('Xwordlist.spl') - call delete('Xwordlist.dic') endfunc " Test for the :mkspell command --- 557,562 ---- *************** *** 600,607 **** CheckNotMSWindows " No word count in .dic file ! call writefile([], 'Xtest.dic') ! call writefile([], 'Xtest.aff') call assert_fails('mkspell! Xtest.spl Xtest', 'E760:') " create a .dic file for the tests below --- 597,604 ---- CheckNotMSWindows " No word count in .dic file ! call writefile([], 'Xtest.dic', 'D') ! call writefile([], 'Xtest.aff', 'D') call assert_fails('mkspell! Xtest.spl Xtest', 'E760:') " create a .dic file for the tests below *************** *** 822,841 **** " use multiple .aff files with different values for COMPOUNDWORDMAX and " MIDWORD (number and string) ! call writefile(['1', 'world'], 'Xtest_US.dic') ! call writefile(['1', 'world'], 'Xtest_CA.dic') ! call writefile(["COMPOUNDWORDMAX 3", "MIDWORD '-"], 'Xtest_US.aff') ! call writefile(["COMPOUNDWORDMAX 4", "MIDWORD '="], 'Xtest_CA.aff') let output = execute('mkspell! Xtest.spl Xtest_US Xtest_CA') call assert_match('COMPOUNDWORDMAX value differs from what is used in another .aff file', output) call assert_match('MIDWORD value differs from what is used in another .aff file', output) - call delete('Xtest_US.dic') - call delete('Xtest_CA.dic') - call delete('Xtest_US.aff') - call delete('Xtest_CA.aff') - call delete('Xtest.dic') - call delete('Xtest.aff') call delete('Xtest.spl') call delete('Xtest.sug') endfunc --- 819,832 ---- " use multiple .aff files with different values for COMPOUNDWORDMAX and " MIDWORD (number and string) ! call writefile(['1', 'world'], 'Xtest_US.dic', 'D') ! call writefile(['1', 'world'], 'Xtest_CA.dic', 'D') ! call writefile(["COMPOUNDWORDMAX 3", "MIDWORD '-"], 'Xtest_US.aff', 'D') ! call writefile(["COMPOUNDWORDMAX 4", "MIDWORD '="], 'Xtest_CA.aff', 'D') let output = execute('mkspell! Xtest.spl Xtest_US Xtest_CA') call assert_match('COMPOUNDWORDMAX value differs from what is used in another .aff file', output) call assert_match('MIDWORD value differs from what is used in another .aff file', output) call delete('Xtest.spl') call delete('Xtest.sug') endfunc *************** *** 855,862 **** endfunc func Test_spellfile_verbose() ! call writefile(['1', 'one'], 'XtestVerbose.dic') ! call writefile([], 'XtestVerbose.aff') mkspell! XtestVerbose-utf8.spl XtestVerbose set spell --- 846,853 ---- endfunc func Test_spellfile_verbose() ! call writefile(['1', 'one'], 'XtestVerbose.dic', 'D') ! call writefile([], 'XtestVerbose.aff', 'D') mkspell! XtestVerbose-utf8.spl XtestVerbose set spell *************** *** 869,883 **** call assert_notmatch('Reading spell file "XtestVerbose-utf8.spl"', a) set spell& spelllang& - call delete('XtestVerbose.dic') - call delete('XtestVerbose.aff') call delete('XtestVerbose-utf8.spl') endfunc " Test NOBREAK (see :help spell-NOBREAK) func Test_NOBREAK() ! call writefile(['3', 'one', 'two', 'three' ], 'XtestNOBREAK.dic') ! call writefile(['NOBREAK' ], 'XtestNOBREAK.aff') mkspell! XtestNOBREAK-utf8.spl XtestNOBREAK set spell spelllang=XtestNOBREAK-utf8.spl --- 860,872 ---- call assert_notmatch('Reading spell file "XtestVerbose-utf8.spl"', a) set spell& spelllang& call delete('XtestVerbose-utf8.spl') endfunc " Test NOBREAK (see :help spell-NOBREAK) func Test_NOBREAK() ! call writefile(['3', 'one', 'two', 'three' ], 'XtestNOBREAK.dic', 'D') ! call writefile(['NOBREAK' ], 'XtestNOBREAK.aff', 'D') mkspell! XtestNOBREAK-utf8.spl XtestNOBREAK set spell spelllang=XtestNOBREAK-utf8.spl *************** *** 899,906 **** bw! set spell& spelllang& - call delete('XtestNOBREAK.dic') - call delete('XtestNOBREAK.aff') call delete('XtestNOBREAK-utf8.spl') endfunc --- 888,893 ---- *************** *** 910,920 **** \ 'one/c', \ 'two/c', \ 'three/c', ! \ 'four'], 'XtestCHECKCOMPOUNDPATTERN.dic') " Forbid compound words where first word ends with 'wo' and second starts with 'on'. call writefile(['CHECKCOMPOUNDPATTERN 1', \ 'CHECKCOMPOUNDPATTERN wo on', ! \ 'COMPOUNDFLAG c'], 'XtestCHECKCOMPOUNDPATTERN.aff') mkspell! XtestCHECKCOMPOUNDPATTERN-utf8.spl XtestCHECKCOMPOUNDPATTERN set spell spelllang=XtestCHECKCOMPOUNDPATTERN-utf8.spl --- 897,907 ---- \ 'one/c', \ 'two/c', \ 'three/c', ! \ 'four'], 'XtestCHECKCOMPOUNDPATTERN.dic', 'D') " Forbid compound words where first word ends with 'wo' and second starts with 'on'. call writefile(['CHECKCOMPOUNDPATTERN 1', \ 'CHECKCOMPOUNDPATTERN wo on', ! \ 'COMPOUNDFLAG c'], 'XtestCHECKCOMPOUNDPATTERN.aff', 'D') mkspell! XtestCHECKCOMPOUNDPATTERN-utf8.spl XtestCHECKCOMPOUNDPATTERN set spell spelllang=XtestCHECKCOMPOUNDPATTERN-utf8.spl *************** *** 938,945 **** endfor set spell& spelllang& - call delete('XtestCHECKCOMPOUNDPATTERN.dic') - call delete('XtestCHECKCOMPOUNDPATTERN.aff') call delete('XtestCHECKCOMPOUNDPATTERN-utf8.spl') endfunc --- 925,930 ---- *************** *** 948,962 **** call writefile(['3', \ 'one/c', \ 'two/c', ! \ 'three/c'], 'XtestNOCOMPOUNDSUGS.dic') " pass 0 tests without NOCOMPOUNDSUGS, pass 1 tests with NOCOMPOUNDSUGS for pass in [0, 1] if pass == 0 ! call writefile(['COMPOUNDFLAG c'], 'XtestNOCOMPOUNDSUGS.aff') else call writefile(['NOCOMPOUNDSUGS', ! \ 'COMPOUNDFLAG c'], 'XtestNOCOMPOUNDSUGS.aff') endif mkspell! XtestNOCOMPOUNDSUGS-utf8.spl XtestNOCOMPOUNDSUGS --- 933,947 ---- call writefile(['3', \ 'one/c', \ 'two/c', ! \ 'three/c'], 'XtestNOCOMPOUNDSUGS.dic', 'D') " pass 0 tests without NOCOMPOUNDSUGS, pass 1 tests with NOCOMPOUNDSUGS for pass in [0, 1] if pass == 0 ! call writefile(['COMPOUNDFLAG c'], 'XtestNOCOMPOUNDSUGS.aff', 'D') else call writefile(['NOCOMPOUNDSUGS', ! \ 'COMPOUNDFLAG c'], 'XtestNOCOMPOUNDSUGS.aff', 'D') endif mkspell! XtestNOCOMPOUNDSUGS-utf8.spl XtestNOCOMPOUNDSUGS *************** *** 984,991 **** endfor set spell& spelllang& - call delete('XtestNOCOMPOUNDSUGS.dic') - call delete('XtestNOCOMPOUNDSUGS.aff') call delete('XtestNOCOMPOUNDSUGS-utf8.spl') endfunc --- 969,974 ---- *************** *** 998,1005 **** \ 'any', \ 'tee', \ 'the', ! \ 'ted'], 'XtestCOMMON.dic') ! call writefile(['COMMON the and'], 'XtestCOMMON.aff') mkspell! XtestCOMMON-utf8.spl XtestCOMMON set spell spelllang=XtestCOMMON-utf8.spl --- 981,988 ---- \ 'any', \ 'tee', \ 'the', ! \ 'ted'], 'XtestCOMMON.dic', 'D') ! call writefile(['COMMON the and'], 'XtestCOMMON.aff', 'D') mkspell! XtestCOMMON-utf8.spl XtestCOMMON set spell spelllang=XtestCOMMON-utf8.spl *************** *** 1011,1025 **** call assert_equal(['the', 'tee'], spellsuggest('dhe', 2)) set spell& spelllang& - call delete('XtestCOMMON.dic') - call delete('XtestCOMMON.aff') call delete('XtestCOMMON-utf8.spl') endfunc " Test NOSUGGEST (see :help spell-COMMON) func Test_spellfile_NOSUGGEST() ! call writefile(['2', 'foo/X', 'fog'], 'XtestNOSUGGEST.dic') ! call writefile(['NOSUGGEST X'], 'XtestNOSUGGEST.aff') mkspell! XtestNOSUGGEST-utf8.spl XtestNOSUGGEST set spell spelllang=XtestNOSUGGEST-utf8.spl --- 994,1006 ---- call assert_equal(['the', 'tee'], spellsuggest('dhe', 2)) set spell& spelllang& call delete('XtestCOMMON-utf8.spl') endfunc " Test NOSUGGEST (see :help spell-COMMON) func Test_spellfile_NOSUGGEST() ! call writefile(['2', 'foo/X', 'fog'], 'XtestNOSUGGEST.dic', 'D') ! call writefile(['NOSUGGEST X'], 'XtestNOSUGGEST.aff', 'D') mkspell! XtestNOSUGGEST-utf8.spl XtestNOSUGGEST set spell spelllang=XtestNOSUGGEST-utf8.spl *************** *** 1037,1044 **** call assert_equal(['fog'], spellsuggest('fogg', 1)) set spell& spelllang& - call delete('XtestNOSUGGEST.dic') - call delete('XtestNOSUGGEST.aff') call delete('XtestNOSUGGEST-utf8.spl') endfunc --- 1018,1023 ---- *************** *** 1047,1053 **** func Test_spellfile_CIRCUMFIX() " Example taken verbatim from https://github.com/hunspell/hunspell/tree/master/tests call writefile(['1', ! \ 'nagy/C po:adj'], 'XtestCIRCUMFIX.dic') call writefile(['# circumfixes: ~ obligate prefix/suffix combinations', \ '# superlative in Hungarian: leg- (prefix) AND -bb (suffix)', \ '', --- 1026,1032 ---- func Test_spellfile_CIRCUMFIX() " Example taken verbatim from https://github.com/hunspell/hunspell/tree/master/tests call writefile(['1', ! \ 'nagy/C po:adj'], 'XtestCIRCUMFIX.dic', 'D') call writefile(['# circumfixes: ~ obligate prefix/suffix combinations', \ '# superlative in Hungarian: leg- (prefix) AND -bb (suffix)', \ '', *************** *** 1062,1068 **** \ 'SFX C Y 3', \ 'SFX C 0 obb . is:COMPARATIVE', \ 'SFX C 0 obb/AX . is:SUPERLATIVE', ! \ 'SFX C 0 obb/BX . is:SUPERSUPERLATIVE'], 'XtestCIRCUMFIX.aff') mkspell! XtestCIRCUMFIX-utf8.spl XtestCIRCUMFIX set spell spelllang=XtestCIRCUMFIX-utf8.spl --- 1041,1047 ---- \ 'SFX C Y 3', \ 'SFX C 0 obb . is:COMPARATIVE', \ 'SFX C 0 obb/AX . is:SUPERLATIVE', ! \ 'SFX C 0 obb/BX . is:SUPERSUPERLATIVE'], 'XtestCIRCUMFIX.aff', 'D') mkspell! XtestCIRCUMFIX-utf8.spl XtestCIRCUMFIX set spell spelllang=XtestCIRCUMFIX-utf8.spl *************** *** 1081,1088 **** endfor set spell& spelllang& - call delete('XtestCIRCUMFIX.dic') - call delete('XtestCIRCUMFIX.aff') call delete('XtestCIRCUMFIX-utf8.spl') endfunc --- 1060,1065 ---- *************** *** 1094,1105 **** \ 'SFX A are hiamo [cg]are', \ 'SFX A re mo iare', \ 'SFX A re vamo are'], ! \ 'XtestSFX.aff') " Examples of Italian verbs: " - cantare = to sing " - cercare = to search " - odiare = to hate ! call writefile(['3', 'cantare/A', 'cercare/A', 'odiare/A'], 'XtestSFX.dic') mkspell! XtestSFX-utf8.spl XtestSFX set spell spelllang=XtestSFX-utf8.spl --- 1071,1082 ---- \ 'SFX A are hiamo [cg]are', \ 'SFX A re mo iare', \ 'SFX A re vamo are'], ! \ 'XtestSFX.aff', 'D') " Examples of Italian verbs: " - cantare = to sing " - cercare = to search " - odiare = to hate ! call writefile(['3', 'cantare/A', 'cercare/A', 'odiare/A'], 'XtestSFX.dic', 'D') mkspell! XtestSFX-utf8.spl XtestSFX set spell spelllang=XtestSFX-utf8.spl *************** *** 1123,1130 **** call assert_equal(['odiamo'], spellsuggest('odiiamo', 1)) set spell& spelllang& - call delete('XtestSFX.dic') - call delete('XtestSFX.aff') call delete('XtestSFX-utf8.spl') endfunc --- 1100,1105 ---- *************** *** 1133,1139 **** func Test_init_spellfile() let save_rtp = &rtp let save_encoding = &encoding ! call mkdir('Xrtp/spell', 'p') call writefile(['vim'], 'Xrtp/spell/Xtest.dic') silent mkspell Xrtp/spell/Xtest.utf-8.spl Xrtp/spell/Xtest.dic set runtimepath=./Xrtp --- 1108,1114 ---- func Test_init_spellfile() let save_rtp = &rtp let save_encoding = &encoding ! call mkdir('Xrtp/spell', 'pR') call writefile(['vim'], 'Xrtp/spell/Xtest.dic') silent mkspell Xrtp/spell/Xtest.utf-8.spl Xrtp/spell/Xtest.dic set runtimepath=./Xrtp *************** *** 1143,1150 **** call assert_equal('./Xrtp/spell/Xtest.utf-8.add', &spellfile) call assert_equal(['abc'], readfile('Xrtp/spell/Xtest.utf-8.add')) call assert_true(filereadable('Xrtp/spell/Xtest.utf-8.spl')) set spell& spelllang& spellfile& - call delete('Xrtp', 'rf') let &encoding = save_encoding let &rtp = save_rtp %bw! --- 1118,1125 ---- call assert_equal('./Xrtp/spell/Xtest.utf-8.add', &spellfile) call assert_equal(['abc'], readfile('Xrtp/spell/Xtest.utf-8.add')) call assert_true(filereadable('Xrtp/spell/Xtest.utf-8.spl')) + set spell& spelllang& spellfile& let &encoding = save_encoding let &rtp = save_rtp %bw! *************** *** 1170,1181 **** " this was using a NULL pointer func Test_mkspell_empty_dic() ! call writefile(['1'], 'XtestEmpty.dic') ! call writefile(['SOFOFROM abcd', 'SOFOTO ABCD', 'SAL CIA X'], 'XtestEmpty.aff') mkspell! XtestEmpty.spl XtestEmpty - call delete('XtestEmpty.dic') - call delete('XtestEmpty.aff') call delete('XtestEmpty.spl') endfunc --- 1145,1154 ---- " this was using a NULL pointer func Test_mkspell_empty_dic() ! call writefile(['1'], 'XtestEmpty.dic', 'D') ! call writefile(['SOFOFROM abcd', 'SOFOTO ABCD', 'SAL CIA X'], 'XtestEmpty.aff', 'D') mkspell! XtestEmpty.spl XtestEmpty call delete('XtestEmpty.spl') endfunc *** ../vim-9.0.0718/src/testdir/test_startup.vim 2022-09-24 12:50:40.602168025 +0100 --- src/testdir/test_startup.vim 2022-10-10 22:36:33.175957540 +0100 *************** *** 43,56 **** quit [CODE] ! call mkdir('Xhere/plugin', 'p') call writefile(['let g:sequence .= "here "'], 'Xhere/plugin/here.vim') ! call mkdir('Xanother/plugin', 'p') call writefile(['let g:sequence .= "another "'], 'Xanother/plugin/another.vim') call mkdir('Xhere/pack/foo/start/foobar/plugin', 'p') call writefile(['let g:sequence .= "pack "'], 'Xhere/pack/foo/start/foobar/plugin/foo.vim') ! call mkdir('Xafter/plugin', 'p') call writefile(['let g:sequence .= "after "'], 'Xafter/plugin/later.vim') if RunVim(before, after, '') --- 43,56 ---- quit [CODE] ! call mkdir('Xhere/plugin', 'pR') call writefile(['let g:sequence .= "here "'], 'Xhere/plugin/here.vim') ! call mkdir('Xanother/plugin', 'pR') call writefile(['let g:sequence .= "another "'], 'Xanother/plugin/another.vim') call mkdir('Xhere/pack/foo/start/foobar/plugin', 'p') call writefile(['let g:sequence .= "pack "'], 'Xhere/pack/foo/start/foobar/plugin/foo.vim') ! call mkdir('Xafter/plugin', 'pR') call writefile(['let g:sequence .= "after "'], 'Xafter/plugin/later.vim') if RunVim(before, after, '') *************** *** 72,80 **** call delete('Xtestout') call delete('Xsequence') - call delete('Xhere', 'rf') - call delete('Xanother', 'rf') - call delete('Xafter', 'rf') endfunc func Test_pack_in_rtp_when_plugins_run() --- 72,77 ---- *************** *** 92,98 **** let after = [ \ 'quit', \ ] ! call mkdir('Xhere/plugin', 'p') call writefile(['redir! > Xtestout', 'silent set runtimepath?', 'silent! call foo#Trigger()', 'redir END'], 'Xhere/plugin/here.vim') call mkdir('Xhere/pack/foo/start/foobar/autoload', 'p') call writefile(['function! foo#Trigger()', 'echo "autoloaded foo"', 'endfunction'], 'Xhere/pack/foo/start/foobar/autoload/foo.vim') --- 89,95 ---- let after = [ \ 'quit', \ ] ! call mkdir('Xhere/plugin', 'pR') call writefile(['redir! > Xtestout', 'silent set runtimepath?', 'silent! call foo#Trigger()', 'redir END'], 'Xhere/plugin/here.vim') call mkdir('Xhere/pack/foo/start/foobar/autoload', 'p') call writefile(['function! foo#Trigger()', 'echo "autoloaded foo"', 'endfunction'], 'Xhere/pack/foo/start/foobar/autoload/foo.vim') *************** *** 105,111 **** endif call delete('Xtestout') - call delete('Xhere', 'rf') endfunc func Test_help_arg() --- 102,107 ---- *************** *** 228,234 **** call assert_equal('foo', bn1) call assert_equal('bar', bn2) endif - call delete('Xtestout') endfunc --- 224,229 ---- *************** *** 303,309 **** return 666 } END ! call writefile(lines, 'Xbadfile.c') let after =<< trim [CODE] call writefile([&errorfile, string(getpos("."))], "XtestoutQarg") --- 298,304 ---- return 666 } END ! call writefile(lines, 'Xbadfile.c', 'D') let after =<< trim [CODE] call writefile([&errorfile, string(getpos("."))], "XtestoutQarg") *************** *** 314,320 **** " Test with default argument '-q'. call assert_equal('errors.err', &errorfile) ! call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err') if RunVim([], after, '-q') let lines = readfile('XtestoutQarg') call assert_equal(['errors.err', --- 309,315 ---- " Test with default argument '-q'. call assert_equal('errors.err', &errorfile) ! call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err', 'D') if RunVim([], after, '-q') let lines = readfile('XtestoutQarg') call assert_equal(['errors.err', *************** *** 323,332 **** \ lines) endif call delete('XtestoutQarg') - call delete('errors.err') " Test with explicit argument '-q XerrorsQarg' (with space). ! call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'XerrorsQarg') if RunVim([], after, '-q XerrorsQarg') let lines = readfile('XtestoutQarg') call assert_equal(['XerrorsQarg', --- 318,326 ---- \ lines) endif call delete('XtestoutQarg') " Test with explicit argument '-q XerrorsQarg' (with space). ! call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'XerrorsQarg', 'D') if RunVim([], after, '-q XerrorsQarg') let lines = readfile('XtestoutQarg') call assert_equal(['XerrorsQarg', *************** *** 349,357 **** let out = system(GetVimCommand() .. ' -q xyz.err') call assert_equal(3, v:shell_error) - call delete('Xbadfile.c') call delete('XtestoutQarg') - call delete('XerrorsQarg') endfunc " Test the -V[N]{filename} argument to set the 'verbose' option to N --- 343,349 ---- *************** *** 400,406 **** " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes). func Test_A_F_H_arg() let after =<< trim [CODE] ! call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout") qall [CODE] --- 392,398 ---- " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes). func Test_A_F_H_arg() let after =<< trim [CODE] ! call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout", 'D') qall [CODE] *************** *** 420,427 **** let lines = readfile('Xtestout') call assert_equal(['1', '0', '0', '1'], lines) endif - - call delete('Xtestout') endfunc " Test the --echo-wid argument (for GTK GUI only). --- 412,417 ---- *************** *** 799,805 **** func Test_zzz_startinsert() " Test :startinsert ! call writefile(['123456'], 'Xtestout') let after =<< trim [CODE] :startinsert call feedkeys("foobar\:wq\","t") --- 789,795 ---- func Test_zzz_startinsert() " Test :startinsert ! call writefile(['123456'], 'Xtestout', 'D') let after =<< trim [CODE] :startinsert call feedkeys("foobar\:wq\","t") *************** *** 820,826 **** let lines = readfile('Xtestout') call assert_equal(['123456foobar'], lines) endif - call delete('Xtestout') endfunc func Test_issue_3969() --- 810,815 ---- *************** *** 898,905 **** \ "first\tXfile1\t/^ \\zsfirst$/", \ "second\tXfile1\t/^ \\zssecond$/", \ "third\tXfile1\t/^ \\zsthird$/"], ! \ 'Xtags') ! call writefile([' first', ' second', ' third'], 'Xfile1') for t_arg in ['-t second', '-tsecond'] if RunVim(before, after, t_arg) --- 887,894 ---- \ "first\tXfile1\t/^ \\zsfirst$/", \ "second\tXfile1\t/^ \\zssecond$/", \ "third\tXfile1\t/^ \\zsthird$/"], ! \ 'Xtags', 'D') ! call writefile([' first', ' second', ' third'], 'Xfile1', 'D') for t_arg in ['-t second', '-tsecond'] if RunVim(before, after, t_arg) *************** *** 907,915 **** call delete('Xtestout') endif endfor - - call delete('Xtags') - call delete('Xfile1') endfunc " Test the '-T' argument which sets the 'term' option. --- 896,901 ---- *************** *** 1006,1012 **** call assert_match('^E282:', v:errmsg) call writefile(v:errors, 'Xtestout') [CODE] ! call writefile(after, 'Xafter') let cmd = GetVimCommandCleanTerm() . ' -u Xvimrc_missing -S Xafter' let buf = term_start(cmd, {'term_rows' : 10}) --- 992,998 ---- call assert_match('^E282:', v:errmsg) call writefile(v:errors, 'Xtestout') [CODE] ! call writefile(after, 'Xafter', 'D') let cmd = GetVimCommandCleanTerm() . ' -u Xvimrc_missing -S Xafter' let buf = term_start(cmd, {'term_rows' : 10}) *************** *** 1017,1023 **** call WaitForAssert({-> assert_match(':', term_getline(buf, 10))}) call StopVimInTerminal(buf) call assert_equal([], readfile('Xtestout')) ! call delete('Xafter') call delete('Xtestout') endfunc --- 1003,1009 ---- call WaitForAssert({-> assert_match(':', term_getline(buf, 10))}) call StopVimInTerminal(buf) call assert_equal([], readfile('Xtestout')) ! call delete('Xtestout') endfunc *************** *** 1029,1041 **** call writefile(v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' call setenv('VIMINIT', 'let viminit_found="yes"') exe "silent !" . cmd call assert_equal([], readfile('Xtestout')) call delete('Xtestout') - call delete('Xafter') endfunc " Test for using the $EXINIT environment variable --- 1015,1027 ---- call writefile(v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter', 'D') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' call setenv('VIMINIT', 'let viminit_found="yes"') exe "silent !" . cmd call assert_equal([], readfile('Xtestout')) + call delete('Xtestout') endfunc " Test for using the $EXINIT environment variable *************** *** 1046,1058 **** call writefile(v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' call setenv('EXINIT', 'let exinit_found="yes"') exe "silent !" . cmd call assert_equal([], readfile('Xtestout')) call delete('Xtestout') - call delete('Xafter') endfunc " Test for using the 'exrc' option --- 1032,1044 ---- call writefile(v:errors, 'Xtestout') qall [CODE] ! call writefile(after, 'Xafter', 'D') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "set enc=utf8"' call setenv('EXINIT', 'let exinit_found="yes"') exe "silent !" . cmd call assert_equal([], readfile('Xtestout')) + call delete('Xtestout') endfunc " Test for using the 'exrc' option *************** *** 1064,1076 **** call writefile(v:errors, 'Xtestout') qall [CODE] ! call mkdir('Xrcdir') call writefile(['let exrc_found=37'], 'Xrcdir/.exrc') call writefile(after, 'Xrcdir/Xafter') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "cd Xrcdir" --cmd "set enc=utf8 exrc secure"' exe "silent !" . cmd call assert_equal([], readfile('Xrcdir/Xtestout')) - call delete('Xrcdir', 'rf') endfunc " Test for starting Vim with a non-terminal as input/output --- 1050,1061 ---- call writefile(v:errors, 'Xtestout') qall [CODE] ! call mkdir('Xrcdir', 'R') call writefile(['let exrc_found=37'], 'Xrcdir/.exrc') call writefile(after, 'Xrcdir/Xafter') let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "cd Xrcdir" --cmd "set enc=utf8 exrc secure"' exe "silent !" . cmd call assert_equal([], readfile('Xrcdir/Xtestout')) endfunc " Test for starting Vim with a non-terminal as input/output *************** *** 1138,1144 **** " Can't catch the output of gvim. CheckNotGui ! call writefile(["iVim Editor\:q!\"], 'Xscriptin', 'b') if RunVim([], [], '-s Xscriptin -w Xscriptout') call assert_equal(["iVim Editor\e:q!\r"], readfile('Xscriptout')) call delete('Xscriptout') --- 1123,1129 ---- " Can't catch the output of gvim. CheckNotGui ! call writefile(["iVim Editor\:q!\"], 'Xscriptin', 'bD') if RunVim([], [], '-s Xscriptin -w Xscriptout') call assert_equal(["iVim Editor\e:q!\r"], readfile('Xscriptout')) call delete('Xscriptout') *************** *** 1162,1168 **** call delete('Xresult') endif endfor - call delete('Xscriptin') endfunc " Test for the "-s scriptin" argument --- 1147,1152 ---- *************** *** 1174,1183 **** let m = system(GetVimCommand() .. " -s abcxyz") call assert_equal("Cannot open for reading: \"abcxyz\"\n", m) ! call writefile([], 'Xinput') let m = system(GetVimCommand() .. " -s Xinput -s Xinput") call assert_equal("Attempt to open script file again: \"-s Xinput\"\n", m) - call delete('Xinput') endfunc " Test for the "-n" (no swap file) argument --- 1158,1166 ---- let m = system(GetVimCommand() .. " -s abcxyz") call assert_equal("Cannot open for reading: \"abcxyz\"\n", m) ! call writefile([], 'Xinput', 'D') let m = system(GetVimCommand() .. " -s Xinput -s Xinput") call assert_equal("Attempt to open script file again: \"-s Xinput\"\n", m) endfunc " Test for the "-n" (no swap file) argument *************** *** 1252,1258 **** func Test_progname() CheckUnix ! call mkdir('Xprogname', 'p') call writefile(['silent !date', \ 'call writefile([mode(1), ' \ .. '&insertmode, &diff, &readonly, &updatecount, ' --- 1235,1241 ---- func Test_progname() CheckUnix ! call mkdir('Xprogname', 'pD') call writefile(['silent !date', \ 'call writefile([mode(1), ' \ .. '&insertmode, &diff, &readonly, &updatecount, ' *************** *** 1324,1335 **** endfor call delete('Xprogname_after') - call delete('Xprogname', 'd') endfunc " Test for doing a write from .vimrc func Test_write_in_vimrc() ! call writefile(['silent! write'], 'Xvimrc') let after =<< trim [CODE] call assert_match('E32: ', v:errmsg) call writefile(v:errors, 'Xtestout') --- 1307,1317 ---- endfor call delete('Xprogname_after') endfunc " Test for doing a write from .vimrc func Test_write_in_vimrc() ! call writefile(['silent! write'], 'Xvimrc', 'D') let after =<< trim [CODE] call assert_match('E32: ', v:errmsg) call writefile(v:errors, 'Xtestout') *************** *** 1339,1345 **** call assert_equal([], readfile('Xtestout')) call delete('Xtestout') endif - call delete('Xvimrc') endfunc func Test_echo_true_in_cmd() --- 1321,1326 ---- *************** *** 1350,1360 **** call writefile(['done'], 'Xresult') quit END ! call writefile(lines, 'Xscript') if RunVim([], [], '--cmd "source Xscript"') call assert_equal(['done'], readfile('Xresult')) endif ! call delete('Xscript') call delete('Xresult') endfunc --- 1331,1341 ---- call writefile(['done'], 'Xresult') quit END ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--cmd "source Xscript"') call assert_equal(['done'], readfile('Xresult')) endif ! call delete('Xresult') endfunc *************** *** 1365,1375 **** call writefile(['done'], 'Xresult') qa! END ! call writefile(lines, 'Xscript') if RunVim([], [], "--clean -e -s --cmd 'file x|new|file x' --cmd 'so Xscript'") call assert_equal(['done'], readfile('Xresult')) endif ! call delete('Xscript') call delete('Xresult') endfunc --- 1346,1356 ---- call writefile(['done'], 'Xresult') qa! END ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], "--clean -e -s --cmd 'file x|new|file x' --cmd 'so Xscript'") call assert_equal(['done'], readfile('Xresult')) endif ! call delete('Xresult') endfunc *** ../vim-9.0.0718/src/testdir/test_startup_utf8.vim 2020-08-12 17:43:41.000000000 +0100 --- src/testdir/test_startup_utf8.vim 2022-10-10 22:21:26.130083650 +0100 *************** *** 6,12 **** func Test_read_stdin_utf8() let linesin = ['テスト', '€ÀÈÌÒÙ'] ! call writefile(linesin, 'Xtestin') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', --- 6,12 ---- func Test_read_stdin_utf8() let linesin = ['テスト', '€ÀÈÌÒÙ'] ! call writefile(linesin, 'Xtestin', 'D') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', *************** *** 26,33 **** else call assert_equal('', 'RunVimPiped failed.') endif call delete('Xtestout') - call delete('Xtestin') endfunc func Test_read_fifo_utf8() --- 26,33 ---- else call assert_equal('', 'RunVimPiped failed.') endif + call delete('Xtestout') endfunc func Test_read_fifo_utf8() *************** *** 41,47 **** throw 'Skipped: bash or zsh is required' endif let linesin = ['テスト', '€ÀÈÌÒÙ'] ! call writefile(linesin, 'Xtestin') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', --- 41,47 ---- throw 'Skipped: bash or zsh is required' endif let linesin = ['テスト', '€ÀÈÌÒÙ'] ! call writefile(linesin, 'Xtestin', 'D') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', *************** *** 56,63 **** else call assert_equal('', 'RunVim failed.') endif call delete('Xtestout') - call delete('Xtestin') endfunc func Test_detect_ambiwidth() --- 56,63 ---- else call assert_equal('', 'RunVim failed.') endif + call delete('Xtestout') endfunc func Test_detect_ambiwidth() *************** *** 69,82 **** \ 'set ambiwidth=double', \ 'call test_option_not_set("ambiwidth")', \ 'redraw', ! \ ], 'Xscript') let buf = RunVimInTerminal('-S Xscript', #{keep_t_u7: 1}) call TermWait(buf) call term_sendkeys(buf, "S\=&ambiwidth\\") call WaitForAssert({-> assert_match('single', term_getline(buf, 1))}) call StopVimInTerminal(buf) - call delete('Xscript') endfunc " vim: shiftwidth=2 sts=2 expandtab --- 69,81 ---- \ 'set ambiwidth=double', \ 'call test_option_not_set("ambiwidth")', \ 'redraw', ! \ ], 'Xscript', 'D') let buf = RunVimInTerminal('-S Xscript', #{keep_t_u7: 1}) call TermWait(buf) call term_sendkeys(buf, "S\=&ambiwidth\\") call WaitForAssert({-> assert_match('single', term_getline(buf, 1))}) call StopVimInTerminal(buf) endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-9.0.0718/src/testdir/test_stat.vim 2022-09-02 21:55:45.507049444 +0100 --- src/testdir/test_stat.vim 2022-10-10 22:22:35.069910225 +0100 *************** *** 63,69 **** let fname = 'Xtest.tmp' let fl = ['Hello World!'] ! call writefile(fl, fname) set autoread exec 'e' fname call SleepForTimestamp() --- 63,69 ---- let fname = 'Xtest.tmp' let fl = ['Hello World!'] ! call writefile(fl, fname, 'D') set autoread exec 'e' fname call SleepForTimestamp() *************** *** 72,79 **** call writefile(fl, fname) checktime call assert_equal(fl[0], getline(1)) - - call delete(fname) endfunc func Test_checktime_fast() --- 72,77 ---- *************** *** 82,88 **** let fname = 'Xtest.tmp' let fl = ['Hello World!'] ! call writefile(fl, fname) set autoread exec 'e' fname let fl = readfile(fname) --- 80,86 ---- let fname = 'Xtest.tmp' let fl = ['Hello World!'] ! call writefile(fl, fname, 'D') set autoread exec 'e' fname let fl = readfile(fname) *************** *** 90,97 **** call writefile(fl, fname) checktime call assert_equal(fl[0], getline(1)) - - call delete(fname) endfunc func Test_autoread_fast() --- 88,93 ---- *************** *** 105,116 **** call setline(1, 'foo') w! sleep 10m ! call writefile(['bar'], 'Xautoread') sleep 10m checktime call assert_equal('bar', trim(getline(1))) - - call delete('Xautoread') endfunc func Test_autoread_file_deleted() --- 101,110 ---- call setline(1, 'foo') w! sleep 10m ! call writefile(['bar'], 'Xautoread', 'D') sleep 10m checktime call assert_equal('bar', trim(getline(1))) endfunc func Test_autoread_file_deleted() *** ../vim-9.0.0718/src/testdir/test_statusline.vim 2022-07-23 06:24:56.405106035 +0100 --- src/testdir/test_statusline.vim 2022-10-10 22:23:26.005784075 +0100 *************** *** 470,483 **** set laststatus=2 let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡' END ! call writefile(lines, 'XTest_statusline') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50}) call VerifyScreenDump(buf, 'Test_statusline_1', {}) " clean up call StopVimInTerminal(buf) - call delete('XTest_statusline') endfunc func Test_statusline_using_mode() --- 470,482 ---- set laststatus=2 let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡' END ! call writefile(lines, 'XTest_statusline', 'D') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50}) call VerifyScreenDump(buf, 'Test_statusline_1', {}) " clean up call StopVimInTerminal(buf) endfunc func Test_statusline_using_mode() *************** *** 488,494 **** split setlocal statusline=+%{mode()}+ END ! call writefile(lines, 'XTest_statusline') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 7, 'cols': 50}) call VerifyScreenDump(buf, 'Test_statusline_mode_1', {}) --- 487,493 ---- split setlocal statusline=+%{mode()}+ END ! call writefile(lines, 'XTest_statusline', 'D') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 7, 'cols': 50}) call VerifyScreenDump(buf, 'Test_statusline_mode_1', {}) *************** *** 499,505 **** " clean up call term_sendkeys(buf, "close\") call StopVimInTerminal(buf) - call delete('XTest_statusline') endfunc func Test_statusline_after_split_vsplit() --- 498,503 ---- *************** *** 552,564 **** hi! link User2 ErrorMsg set statusline=%.5(%1*ABC%2*DEF%1*GHI%) END ! call writefile(lines, 'XTest_statusline') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) call VerifyScreenDump(buf, 'Test_statusline_hl', {}) call StopVimInTerminal(buf) - call delete('XTest_statusline') endfunc " vim: shiftwidth=2 sts=2 expandtab --- 550,561 ---- hi! link User2 ErrorMsg set statusline=%.5(%1*ABC%2*DEF%1*GHI%) END ! call writefile(lines, 'XTest_statusline', 'D') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) call VerifyScreenDump(buf, 'Test_statusline_hl', {}) call StopVimInTerminal(buf) endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-9.0.0718/src/testdir/test_substitute.vim 2022-09-17 21:07:52.107993141 +0100 --- src/testdir/test_substitute.vim 2022-10-10 22:24:27.597633444 +0100 *************** *** 860,866 **** call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif --- 860,866 ---- call writefile(v:errors, 'Xresult') qall! [SCRIPT] ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif *************** *** 876,882 **** call assert_equal([], readfile('Xresult')) endif - call delete('Xscript') call delete('Xresult') endfunc --- 876,881 ---- *************** *** 1075,1087 **** redir END qall! [SCRIPT] ! call writefile(lines, 'Xscript') if RunVim([], [], '-u NONE -S Xscript') call assert_match('E565: Not allowed to change text or change window', \ readfile('Xresult')->join('XX')) endif - call delete('Xscript') call delete('Xresult') endfunc --- 1074,1085 ---- redir END qall! [SCRIPT] ! call writefile(lines, 'Xscript', 'D') if RunVim([], [], '-u NONE -S Xscript') call assert_match('E565: Not allowed to change text or change window', \ readfile('Xresult')->join('XX')) endif call delete('Xresult') endfunc *** ../vim-9.0.0718/src/testdir/test_swap.vim 2022-04-02 21:41:06.000000000 +0100 --- src/testdir/test_swap.vim 2022-10-10 22:28:11.109101373 +0100 *************** *** 16,22 **** \ 'line 2 Abcdefghij', \ 'line 3 Abcdefghij', \ 'end of testfile'] ! call writefile(content, 'Xtest1') " '.', swap file in the same directory as file set dir=.,~ --- 16,22 ---- \ 'line 2 Abcdefghij', \ 'line 3 Abcdefghij', \ 'end of testfile'] ! call writefile(content, 'Xtest1', 'D') " '.', swap file in the same directory as file set dir=.,~ *************** *** 30,36 **** " './dir', swap file in a directory relative to the file set dir=./Xtest2,.,~ ! call mkdir("Xtest2") edit Xtest1 call assert_equal([], glob(swfname, 1, 1, 1)) let swfname = "Xtest2/Xtest1.swp" --- 30,36 ---- " './dir', swap file in a directory relative to the file set dir=./Xtest2,.,~ ! call mkdir("Xtest2", 'R') edit Xtest1 call assert_equal([], glob(swfname, 1, 1, 1)) let swfname = "Xtest2/Xtest1.swp" *************** *** 40,46 **** " 'dir', swap file in directory relative to the current dir set dir=Xtest.je,~ ! call mkdir("Xtest.je") call writefile(content, 'Xtest2/Xtest3') edit Xtest2/Xtest3 call assert_equal(["Xtest2/Xtest3"], glob("Xtest2/*", 1, 1, 1)) --- 40,46 ---- " 'dir', swap file in directory relative to the current dir set dir=Xtest.je,~ ! call mkdir("Xtest.je", 'R') call writefile(content, 'Xtest2/Xtest3') edit Xtest2/Xtest3 call assert_equal(["Xtest2/Xtest3"], glob("Xtest2/*", 1, 1, 1)) *************** *** 49,57 **** call assert_equal([swfname], glob("Xtest.je/*", 1, 1, 1)) set dir& - call delete("Xtest1") - call delete("Xtest2", "rf") - call delete("Xtest.je", "rf") endfunc func Test_swap_group() --- 49,54 ---- *************** *** 135,141 **** let info = swapinfo('doesnotexist') call assert_equal('Cannot open file', info.error) ! call writefile(['burp'], 'Xnotaswapfile') let info = swapinfo('Xnotaswapfile') call assert_equal('Cannot read file', info.error) call delete('Xnotaswapfile') --- 132,138 ---- let info = swapinfo('doesnotexist') call assert_equal('Cannot open file', info.error) ! call writefile(['burp'], 'Xnotaswapfile', 'D') let info = swapinfo('Xnotaswapfile') call assert_equal('Cannot read file', info.error) call delete('Xnotaswapfile') *************** *** 143,149 **** call writefile([repeat('x', 10000)], 'Xnotaswapfile') let info = swapinfo('Xnotaswapfile') call assert_equal('Not a swap file', info.error) - call delete('Xnotaswapfile') endfunc func Test_swapname() --- 140,145 ---- *************** *** 191,197 **** " Close the file and recreate the swap file. " Now editing the file will run into the process still existing quit ! call writefile(swapfile_bytes, swapfile_name) let s:swap_choice = 'e' let s:swapname = '' split XswapfileText --- 187,193 ---- " Close the file and recreate the swap file. " Now editing the file will run into the process still existing quit ! call writefile(swapfile_bytes, swapfile_name, 'D') let s:swap_choice = 'e' let s:swapname = '' split XswapfileText *************** *** 219,225 **** call assert_equal(fnamemodify(swapfile_name, ':t'), fnamemodify(s:swapname, ':t')) call delete('XswapfileText') - call delete(swapfile_name) augroup test_swapfile_delete autocmd! augroup END --- 215,220 ---- *************** *** 233,239 **** autocmd SwapExists * let v:swapchoice = 'r' augroup END ! call mkdir('Xswap') let $Xswap = 'foo' " Check for issue #4369. set dir=Xswap// " Create a valid swapfile by editing a file. --- 228,234 ---- autocmd SwapExists * let v:swapchoice = 'r' augroup END ! call mkdir('Xswap', 'R') let $Xswap = 'foo' " Check for issue #4369. set dir=Xswap// " Create a valid swapfile by editing a file. *************** *** 246,252 **** " Close the file and recreate the swap file. quit ! call writefile(swapfile_bytes, swapfile_name) " Edit the file again. This triggers recovery. try split Xswap/text --- 241,247 ---- " Close the file and recreate the swap file. quit ! call writefile(swapfile_bytes, swapfile_name, 'D') " Edit the file again. This triggers recovery. try split Xswap/text *************** *** 258,266 **** call assert_equal(['one', 'two', 'three'], getline(1, 3)) quit! - call delete('Xswap/text') - call delete(swapfile_name) - call delete('Xswap', 'd') unlet $Xswap set dir& augroup test_swap_recover --- 253,258 ---- *************** *** 288,294 **** " Close and delete the file and recreate the swap file. quit call delete('Xtest.scr') ! call writefile(swapfile_bytes, swapfile_name) " Edit the file again. This triggers recovery. try split Xtest.scr --- 280,286 ---- " Close and delete the file and recreate the swap file. quit call delete('Xtest.scr') ! call writefile(swapfile_bytes, swapfile_name, 'D') " Edit the file again. This triggers recovery. try split Xtest.scr *************** *** 301,307 **** quit! call delete('Xtest.scr') - call delete(swapfile_name) augroup test_swap_recover_ext autocmd! augroup END --- 293,298 ---- *************** *** 329,335 **** " Close and delete the file and recreate the swap file. quit call delete('Xtest.scr') ! call writefile(swapfile_bytes, swapfile_name) " Split edit the file again. This should fail to open the window try split Xtest.scr --- 320,326 ---- " Close and delete the file and recreate the swap file. quit call delete('Xtest.scr') ! call writefile(swapfile_bytes, swapfile_name, 'D') " Split edit the file again. This should fail to open the window try split Xtest.scr *************** *** 340,346 **** call assert_equal(1, winnr('$')) call delete('Xtest.scr') - call delete(swapfile_name) augroup test_swap_splitwin autocmd! --- 331,336 ---- *************** *** 352,358 **** func Test_swap_prompt_splitwin() CheckRunVimInTerminal ! call writefile(['foo bar'], 'Xfile1') edit Xfile1 preserve " should help to make sure the swap file exists --- 342,348 ---- func Test_swap_prompt_splitwin() CheckRunVimInTerminal ! call writefile(['foo bar'], 'Xfile1', 'D') edit Xfile1 preserve " should help to make sure the swap file exists *************** *** 387,399 **** call StopVimInTerminal(buf) %bwipe! - call delete('Xfile1') endfunc func Test_swap_symlink() CheckUnix ! call writefile(['text'], 'Xtestfile') silent !ln -s -f Xtestfile Xtestlink set dir=. --- 377,388 ---- call StopVimInTerminal(buf) %bwipe! endfunc func Test_swap_symlink() CheckUnix ! call writefile(['text'], 'Xtestfile', 'D') silent !ln -s -f Xtestfile Xtestlink set dir=. *************** *** 404,410 **** call assert_match('Xtestfile\.swp$', s:swapname()) bwipe! ! call mkdir('Xswapdir') exe 'set dir=' . getcwd() . '/Xswapdir//' " Check that this also works when 'directory' ends with '//' --- 393,399 ---- call assert_match('Xtestfile\.swp$', s:swapname()) bwipe! ! call mkdir('Xswapdir', 'R') exe 'set dir=' . getcwd() . '/Xswapdir//' " Check that this also works when 'directory' ends with '//' *************** *** 413,421 **** bwipe! set dir& - call delete('Xtestfile') call delete('Xtestlink') - call delete('Xswapdir', 'rf') endfunc func s:get_unused_pid(base) --- 402,408 ---- *************** *** 467,473 **** " Change the process ID to avoid the "still running" warning. let swapfile_bytes[24:27] = s:pid_to_blob(s:get_unused_pid( \ s:blob_to_pid(swapfile_bytes[24:27]))) ! call writefile(swapfile_bytes, swapfile_name) edit Xtest.scr " will end up using the same swap file after deleting the existing one call assert_equal(swapfile_name, swapname('%')) --- 454,460 ---- " Change the process ID to avoid the "still running" warning. let swapfile_bytes[24:27] = s:pid_to_blob(s:get_unused_pid( \ s:blob_to_pid(swapfile_bytes[24:27]))) ! call writefile(swapfile_bytes, swapfile_name, 'D') edit Xtest.scr " will end up using the same swap file after deleting the existing one call assert_equal(swapfile_name, swapname('%')) *************** *** 491,497 **** bwipe! call delete('Xtest.scr') - call delete(swapfile_name) augroup test_swap_recover_ext autocmd! augroup END --- 478,483 ---- *************** *** 520,532 **** " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile5') edit Xfile5 preserve let swapfname = swapname('') let b = readblob(swapfname) bw! ! call writefile(b, swapfname) autocmd! SwapExists --- 506,518 ---- " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile5', 'D') edit Xfile5 preserve let swapfname = swapname('') let b = readblob(swapfname) bw! ! call writefile(b, swapfname, 'D') autocmd! SwapExists *************** *** 565,571 **** %bw! call assert_false(filereadable(swapfname)) - call delete('Xfile5') call delete(swapfname) augroup test_swapchoice autocmd! --- 551,556 ---- *** ../vim-9.0.0718/src/testdir/test_syntax.vim 2022-08-26 21:58:26.089218709 +0100 --- src/testdir/test_syntax.vim 2022-10-10 22:29:13.612955821 +0100 *************** *** 652,658 **** \ "\t}", \ "\tNote: asdf", \ '}', ! \ ], 'Xtest.c') " This makes the default for 'background' use "dark", check that the " response to t_RB corrects it to "light". --- 652,658 ---- \ "\t}", \ "\tNote: asdf", \ '}', ! \ ], 'Xtest.c', 'D') " This makes the default for 'background' use "dark", check that the " response to t_RB corrects it to "light". *************** *** 670,676 **** call StopVimInTerminal(buf) let $COLORFGBG = '' - call delete('Xtest.c') endfun " Test \z(...) along with \z1 --- 670,675 ---- *************** *** 704,713 **** endfunc func Test_syntax_after_bufdo() ! call writefile(['/* aaa comment */'], 'Xaaa.c') ! call writefile(['/* bbb comment */'], 'Xbbb.c') ! call writefile(['/* ccc comment */'], 'Xccc.c') ! call writefile(['/* ddd comment */'], 'Xddd.c') let bnr = bufnr('%') new Xaaa.c --- 703,712 ---- endfunc func Test_syntax_after_bufdo() ! call writefile(['/* aaa comment */'], 'Xaaa.c', 'D') ! call writefile(['/* bbb comment */'], 'Xbbb.c', 'D') ! call writefile(['/* ccc comment */'], 'Xccc.c', 'D') ! call writefile(['/* ddd comment */'], 'Xddd.c', 'D') let bnr = bufnr('%') new Xaaa.c *************** *** 735,744 **** bwipe! Xccc.c bwipe! Xddd.c syntax off - call delete('Xaaa.c') - call delete('Xbbb.c') - call delete('Xccc.c') - call delete('Xddd.c') endfunc func Test_syntax_foldlevel() --- 734,739 ---- *** ../vim-9.0.0718/src/testdir/test_system.vim 2021-06-27 11:03:53.000000000 +0100 --- src/testdir/test_system.vim 2022-10-10 22:29:56.768855976 +0100 *************** *** 55,61 **** let cmd = ' -es -c "source Xscript" +q; echo "result=$?"' " Need to put this in a script, "catch" isn't found after an unknown " function. ! call writefile(['try', 'call doesnotexist()', 'catch', 'endtry'], 'Xscript') let a = system(GetVimCommand() . cmd) call assert_match('result=0', a) call assert_equal(0, v:shell_error) --- 55,61 ---- let cmd = ' -es -c "source Xscript" +q; echo "result=$?"' " Need to put this in a script, "catch" isn't found after an unknown " function. ! call writefile(['try', 'call doesnotexist()', 'catch', 'endtry'], 'Xscript', 'D') let a = system(GetVimCommand() . cmd) call assert_match('result=0', a) call assert_equal(0, v:shell_error) *************** *** 71,77 **** let cmd = ' -es -c "source Xscript" +q' let a = system(GetVimCommand() . cmd) call assert_notequal(0, v:shell_error) - call delete('Xscript') if has('unix') " echo $? only works on Unix let cmd = ' -es -c "call doesnotexist()" +q; echo $?' --- 71,76 ---- *** ../vim-9.0.0718/src/version.c 2022-10-10 21:09:40.612547493 +0100 --- src/version.c 2022-10-10 22:38:34.647686908 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 719, /**/ -- Witches prefer brooms: vacuum-cleaners need extension cords! /// 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 ///