Mercurial > vim
diff src/testdir/test_suspend.vim @ 31343:97bb0811cfd4 v9.0.1005
patch 9.0.1005: a failed test may leave a swap file behind
Commit: https://github.com/vim/vim/commit/d0f8d39d20f8d42f7451f781f7be0bcd20e06741
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 4 23:00:41 2022 +0000
patch 9.0.1005: a failed test may leave a swap file behind
Problem: A failed test may leave a swap file behind.
Solution: Delete the swap file to avoid another test to fail. Use another
file name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Dec 2022 00:15:06 +0100 |
parents | 3071d91e52f0 |
children | 63065373330a |
line wrap: on
line diff
--- a/src/testdir/test_suspend.vim +++ b/src/testdir/test_suspend.vim @@ -24,6 +24,9 @@ func Test_suspend() call WaitForResponses() + " in case a previous failure left a swap file behind + call delete('.Xfoo.swp') + let buf = term_start('/bin/sh') " Wait for shell prompt. call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))}) @@ -62,6 +65,7 @@ func Test_suspend() exe buf . 'bwipe!' call delete('Xfoo') + call delete('.Xfoo.swp') endfunc func Test_suspend_autocmd() @@ -70,6 +74,9 @@ func Test_suspend_autocmd() call WaitForResponses() + " in case a previous failure left a swap file behind + call delete('.Xfoo.swp') + let buf = term_start('/bin/sh', #{term_rows: 6}) " Wait for shell prompt. call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))}) @@ -108,6 +115,7 @@ func Test_suspend_autocmd() exe buf . 'bwipe!' call delete('Xfoo') + call delete('.Xfoo.swp') endfunc " vim: shiftwidth=2 sts=2 expandtab