Mercurial > vim
comparison src/testdir/test_signals.vim @ 20641:20b6d5304e56 v8.2.0874
patch 8.2.0874: signals test is a bit flaky
Commit: https://github.com/vim/vim/commit/d14fd5285e491a39028c4b4722ddbe7c9dfa9bb2
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 1 15:05:19 2020 +0200
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 #6179)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 01 Jun 2020 15:15:04 +0200 |
parents | 116c7bd5e980 |
children | 34a74f5f0fb4 |
comparison
equal
deleted
inserted
replaced
20640:d9b8b101d506 | 20641:20b6d5304e56 |
---|---|
121 CheckRunVimInTerminal | 121 CheckRunVimInTerminal |
122 let cmd = GetVimCommand() | 122 let cmd = GetVimCommand() |
123 if cmd =~ 'valgrind' | 123 if cmd =~ 'valgrind' |
124 throw 'Skipped: cannot test signal TERM with valgrind' | 124 throw 'Skipped: cannot test signal TERM with valgrind' |
125 endif | 125 endif |
126 | |
127 " If test fails once, it can leave temporary files and trying to rerun | |
128 " the test would then fail again if they are not deleted first. | |
129 call delete('.Xsig_TERM.swp') | |
130 call delete('XsetupAucmd') | |
131 call delete('XautoOut') | |
126 let lines =<< trim END | 132 let lines =<< trim END |
127 au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "a") | 133 au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as") |
128 au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "a") | 134 au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as") |
129 END | 135 END |
130 call writefile(lines, 'XsetupAucmd') | 136 call writefile(lines, 'XsetupAucmd') |
131 | 137 |
132 let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) | 138 let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) |
133 let pid_vim = term_getjob(buf)->job_info().process | 139 let pid_vim = term_getjob(buf)->job_info().process |