To: vim_dev@googlegroups.com Subject: Patch 8.2.3103 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3103 (after 8.2.3102) Problem: Swap test may fail on some systems when jobs take longer to exit. Solution: Use different file names. Files: src/testdir/test_swap.vim *** ../vim-8.2.3102/src/testdir/test_swap.vim 2021-07-04 17:23:04.391297949 +0200 --- src/testdir/test_swap.vim 2021-07-04 17:34:14.469753848 +0200 *************** *** 502,519 **** " Test for renaming a buffer when the swap file is deleted out-of-band func Test_missing_swap_file() CheckUnix ! new Xfile1 call delete(swapname('')) ! call assert_fails('file Xfile2', 'E301:') ! call assert_equal('Xfile2', bufname()) ! call assert_true(bufexists('Xfile1')) call assert_true(bufexists('Xfile2')) %bw! endfunc " Test for :preserve command func Test_preserve() ! new Xfile1 setlocal noswapfile call assert_fails('preserve', 'E313:') bw! --- 502,519 ---- " Test for renaming a buffer when the swap file is deleted out-of-band func Test_missing_swap_file() CheckUnix ! new Xfile2 call delete(swapname('')) ! call assert_fails('file Xfile3', 'E301:') ! call assert_equal('Xfile3', bufname()) call assert_true(bufexists('Xfile2')) + call assert_true(bufexists('Xfile3')) %bw! endfunc " Test for :preserve command func Test_preserve() ! new Xfile4 setlocal noswapfile call assert_fails('preserve', 'E313:') bw! *************** *** 521,528 **** " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile1') ! edit Xfile1 preserve let swapfname = swapname('') let b = readblob(swapfname) --- 521,528 ---- " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile5') ! edit Xfile5 preserve let swapfname = swapname('') let b = readblob(swapfname) *************** *** 536,542 **** autocmd! autocmd SwapExists * let v:swapchoice = 'o' augroup END ! edit Xfile1 call assert_true(&readonly) call assert_equal(['aaa', 'bbb'], getline(1, '$')) %bw! --- 536,542 ---- autocmd! autocmd SwapExists * let v:swapchoice = 'o' augroup END ! edit Xfile5 call assert_true(&readonly) call assert_equal(['aaa', 'bbb'], getline(1, '$')) %bw! *************** *** 548,558 **** autocmd SwapExists * let v:swapchoice = 'a' augroup END try ! edit Xfile1 catch /^Vim:Interrupt$/ endtry call assert_equal('', @%) ! call assert_true(bufexists('Xfile1')) %bw! call assert_true(filereadable(swapfname)) --- 548,558 ---- autocmd SwapExists * let v:swapchoice = 'a' augroup END try ! edit Xfile5 catch /^Vim:Interrupt$/ endtry call assert_equal('', @%) ! call assert_true(bufexists('Xfile5')) %bw! call assert_true(filereadable(swapfname)) *************** *** 561,572 **** autocmd! autocmd SwapExists * let v:swapchoice = 'd' augroup END ! edit Xfile1 ! call assert_equal('Xfile1', @%) %bw! call assert_false(filereadable(swapfname)) ! call delete('Xfile1') call delete(swapfname) augroup test_swapchoice autocmd! --- 561,572 ---- autocmd! autocmd SwapExists * let v:swapchoice = 'd' augroup END ! edit Xfile5 ! call assert_equal('Xfile5', @%) %bw! call assert_false(filereadable(swapfname)) ! call delete('Xfile5') call delete(swapfname) augroup test_swapchoice autocmd! *** ../vim-8.2.3102/src/version.c 2021-07-04 17:23:04.391297949 +0200 --- src/version.c 2021-07-04 17:36:29.825446099 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3103, /**/ -- How many light bulbs does it take to change a person? /// 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 ///