Patch 9.0.1012

13 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 5, 2022, 3:58:38 PM12/5/22
to vim...@googlegroups.com

Patch 9.0.1012
Problem: Tests may get stuck in buffer with swap file.
Solution: Bail out when bwipe! doesn't get another buffer.
Files: src/testdir/runtest.vim


*** ../vim-9.0.1011/src/testdir/runtest.vim 2022-12-05 15:50:38.214348283 +0000
--- src/testdir/runtest.vim 2022-12-05 20:46:21.495271280 +0000
***************
*** 368,374 ****
" buffer, continue until we end up in an empty no-name buffer without a swap
" file.
while bufname() != '' || execute('swapname') !~ 'No swap file'
! bwipe!
endwhile

" Check if the test has left any swap files behind. Delete them before
--- 368,381 ----
" buffer, continue until we end up in an empty no-name buffer without a swap
" file.
while bufname() != '' || execute('swapname') !~ 'No swap file'
! let bn = bufnr()
!
! noswapfile bwipe!
!
! if bn == bufnr()
! " avoid getting stuck in the same buffer
! break
! endif
endwhile

" Check if the test has left any swap files behind. Delete them before
*** ../vim-9.0.1011/src/version.c 2022-12-05 16:23:20.594894902 +0000
--- src/version.c 2022-12-05 20:37:04.911418170 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1012,
/**/

--
hundred-and-one symptoms of being an internet addict:
239. You think "surfing" is something you do on dry land.

/// Bram Moolenaar -- Br...@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 ///

Christopher Plewright

unread,
Dec 6, 2022, 5:22:40 AM12/6/22
to vim_dev
On Tuesday, 6 December 2022 at 07:58:38 UTC+11 Bram Moolenaar wrote:

Patch 9.0.1012
Problem: Tests may get stuck in buffer with swap file.
Solution: Bail out when bwipe! doesn't get another buffer.
Files: src/testdir/runtest.vim


Hi Bram,
After merge with latest, I was getting error in my testing. 
I had to move something for this to work;
See here for fix I had to do:
 
Cheers,
Chris

Bram Moolenaar

unread,
Dec 6, 2022, 8:05:06 AM12/6/22
to vim...@googlegroups.com, Christopher Plewright

Christopher Plewright wrote:

> After merge with latest, I was getting error in my testing.
> I had to move something for this to work;
> See here for fix I had to do:
> https://github.com/vim/vim/commit/c27de670844b55f3c2e59fff5a9d13032d531d5d

Calling s:GetSwapFileList() before it's defined. Strange that I didn't
get an error.

--
"After a few years of marriage a man can look right at a woman
without seeing her and a woman can see right through a man
without looking at him."
- Helen Rowland
Reply all
Reply to author
Forward
0 new messages