This avoids leftover files from tests.
https://github.com/vim/vim/pull/4742
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
If the tests are run without the swapfile, then they are not reflecting how normally Vim is used. The code path exercised by the tests will be different.
Yes, thought the same - but then there are (or should at least be) also explicit tests for it.
Coveralls says:
Coverage decreased (-0.1%) to 80.279%
But that unfortunately is flaky anyway still AFAIK, i.e. not reliable for this kind of analysis.
Under what conditions do you see the swap files in the system after a test run?
Usually in case of test failures only.
Initially I've thought it could avoid having to handle the SwapExist autocommand, but that appears to also be for when an user edits a file under test (although that then would not cause (most of) the test(s) to create/use swap files then).
The PR itself was inspired by test failures in Neovim's test suite, which uses set directory=. (with other directory related settings) as a measurement against messing with user files. This then caused test failures with test_filetype which edits files in /etc where swap files cannot be created.
As for directory I think it's the best to use some temporary directory after all.
I'm -0 on this myself, so feel free to close it.
—
You are receiving this because you commented.
I probably have more tests crash than most others, since I reproduce crashes when trying to fix them. But I don't recall having a problem with swapfiles. Thus I tend to think this is not so relevant.
—
You are receiving this because you commented.