patch 8.0.1631: testing with Vim running in terminal is a bit flaky
Problem: Testing with Vim running in terminal is a bit flaky.
Solution: Delete any .swp file so that later tests don't fail.
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index 1016646..c842215 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -26,6 +26,10 @@
"
" Options is a dictionary (not used yet).
func RunVimInTerminal(arguments, options)
+ " If Vim doesn't exit a swap file remains, causing other tests to fail.
+ " Remove it here.
+ call delete(".swp")
+
" Make a horizontal and vertical split, so that we can get exactly the right
" size terminal window. Works only when we currently have one window.
call assert_equal(1, winnr('$'))