aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-24 19:10:38 -0400
committerGitHub <noreply@github.com>2021-03-24 19:10:38 -0400
commit9481310c264fd9943148f5b82f799badad8730c5 (patch)
tree9a4c3564973c5c76504688485f32c3804143a986 /src
parent1186f7dd96b054d6a653685089fc845a8f5d2f27 (diff)
parentb951d1ff1d52072912a8d65f654a7899fffb39d8 (diff)
downloadrneovim-9481310c264fd9943148f5b82f799badad8730c5.tar.gz
rneovim-9481310c264fd9943148f5b82f799badad8730c5.tar.bz2
rneovim-9481310c264fd9943148f5b82f799badad8730c5.zip
Merge pull request #14203 from janlazo/vim-8.2.2647
vim-patch:8.2.{400,402,2647,2648}
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/runtest.vim8
-rw-r--r--src/nvim/testdir/test_autocmd.vim8
2 files changed, 9 insertions, 7 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 275edece1e..2d94b637e0 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -373,9 +373,6 @@ let s:flaky_tests = [
\ 'Test_with_partial_callback()',
\ ]
-" Pattern indicating a common flaky test failure.
-let s:flaky_errors_re = 'StopVimInTerminal\|VerifyScreenDump'
-
" Locate Test_ functions and execute them.
redir @q
silent function /^Test_
@@ -410,6 +407,9 @@ for s:test in sort(s:tests)
let total_errors = []
let run_nr = 1
+ " A test can set g:test_is_flaky to retry running the test.
+ let g:test_is_flaky = 0
+
call RunTheTest(s:test)
" Repeat a flaky test. Give up when:
@@ -417,7 +417,7 @@ for s:test in sort(s:tests)
" - it fails five times (with a different message)
if len(v:errors) > 0
\ && (index(s:flaky_tests, s:test) >= 0
- \ || v:errors[0] =~ s:flaky_errors_re)
+ \ || g:test_is_flaky)
while 1
call add(s:messages, 'Found errors in ' . s:test . ':')
call extend(s:messages, v:errors)
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 7788e09d43..3401e791c9 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -1366,9 +1366,11 @@ func Test_TextChangedI_with_setline()
endfunc
func Test_Changed_FirstTime()
- if !has('terminal') || has('gui_running')
- return
- endif
+ CheckFeature terminal
+ CheckNotGui
+ " Starting a terminal to run Vim is always considered flaky.
+ let g:test_is_flaky = 1
+
" Prepare file for TextChanged event.
call writefile([''], 'Xchanged.txt')
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})