aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-22 00:31:40 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-22 18:08:47 -0500
commitdd515b70979c70e2461a6f1a16bc9fc5582a7521 (patch)
treeee74416eb09145de68bb503191bd1abd73a0e76a
parentcaf2620f18affec2846b56de4f6bf6453296537a (diff)
downloadrneovim-dd515b70979c70e2461a6f1a16bc9fc5582a7521.tar.gz
rneovim-dd515b70979c70e2461a6f1a16bc9fc5582a7521.tar.bz2
rneovim-dd515b70979c70e2461a6f1a16bc9fc5582a7521.zip
vim-patch:8.2.0874: signals test is a bit flaky
Problem: Signals test is a bit flaky. Solution: Flush the XautoOut file. Delete files that may be left behind from a failure. (Dominique Pelle, closes vim/vim#6179) https://github.com/vim/vim/commit/d14fd5285e491a39028c4b4722ddbe7c9dfa9bb2
-rw-r--r--src/nvim/testdir/test_signals.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_signals.vim b/src/nvim/testdir/test_signals.vim
index fab42cb7c6..338c0d79ff 100644
--- a/src/nvim/testdir/test_signals.vim
+++ b/src/nvim/testdir/test_signals.vim
@@ -98,9 +98,15 @@ func Test_deadly_signal_TERM()
if cmd =~ 'valgrind'
throw 'Skipped: cannot test signal TERM with valgrind'
endif
+
+ " If test fails once, it can leave temporary files and trying to rerun
+ " the test would then fail again if they are not deleted first.
+ call delete('.Xsig_TERM.swp')
+ call delete('XsetupAucmd')
+ call delete('XautoOut')
let lines =<< trim END
- au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "a")
- au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "a")
+ au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as")
+ au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as")
END
call writefile(lines, 'XsetupAucmd')