]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.1874: CI may fail in test_recover_empty_swap v9.0.1874
authorChristian Brabandt <cb@256bit.org>
Tue, 5 Sep 2023 18:40:25 +0000 (20:40 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 5 Sep 2023 18:40:25 +0000 (20:40 +0200)
commit1c7397f3f1e168541f88bb1bbd93a9f0b1235852
tree580ef190c154655da7f4692bb59a1542224b66ba
parentf6d28fe2c95c678cc3202cc5dc825a3fcc709e93
patch 9.0.1874: CI may fail in test_recover_empty_swap

Problem:  CI may fail in test_recover_empty_swap
Solution: Set directory option

Fix failing Test_recover_empty_swap test

:recover by default not only looks in the current directory, but also in
~/tmp for files to recover. If it finds some files to recover, it will
interactively prompt for a file to recover. However, prompting doesn't
work when running the test suite (and even if it would, there is no one
that can answer the prompt).

So it doesn't really make sense during testing, to inspect different
directories for swap files and prompt and wait (which will lead to a
timeout and therefore a failing test).

So set the 'directory' option temporarily to the current directory only
and reset it back once the test finishes.

closes: #13038

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_recover.vim
src/version.c