aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-22 17:45:44 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-22 18:56:43 +0800
commit10990eace23fa7eef39203359dca8f9cde1dcc90 (patch)
tree417b74224c0c03ffdd840b3c61841acbb9b0364a
parentc170708023149221e5364a72094aa9ab94bfe8cd (diff)
downloadrneovim-10990eace23fa7eef39203359dca8f9cde1dcc90.tar.gz
rneovim-10990eace23fa7eef39203359dca8f9cde1dcc90.tar.bz2
rneovim-10990eace23fa7eef39203359dca8f9cde1dcc90.zip
vim-patch:9.0.0415: on MS-Windows some tests are flaky
Problem: On MS-Windows some tests are flaky. Solution: Add sleeps, disable swapfile, mark test as flaky. (Ken Takata, closes vim/vim#11082) https://github.com/vim/vim/commit/0500e87eba7b2a82392dbb5d573de19f8ff138e7 Co-authored-by: K.Takata <kentkt@csc.jp>
-rw-r--r--test/old/testdir/test_autocmd.vim1
-rw-r--r--test/old/testdir/test_buffer.vim2
-rw-r--r--test/old/testdir/test_bufline.vim1
-rw-r--r--test/old/testdir/test_profile.vim1
-rw-r--r--test/old/testdir/test_shell.vim5
-rw-r--r--test/old/testdir/test_undo.vim5
6 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index e2997471ad..a69b293dbd 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -971,6 +971,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
call writefile(content, 'Xvimrc', 'D')
call system(GetVimCommand('Xvimrc') .. ' --headless --noplugins -S Session.vim -c cq')
+ sleep 50m
let errors = join(readfile('Xerrors'))
call assert_match('E814:', errors)
diff --git a/test/old/testdir/test_buffer.vim b/test/old/testdir/test_buffer.vim
index 1ea255da5b..2e5b7491c8 100644
--- a/test/old/testdir/test_buffer.vim
+++ b/test/old/testdir/test_buffer.vim
@@ -379,6 +379,7 @@ endfunc
func Test_buffer_scheme()
CheckMSWindows
+ set noswapfile
set noshellslash
%bwipe!
let bufnames = [
@@ -401,6 +402,7 @@ func Test_buffer_scheme()
endfor
set shellslash&
+ set swapfile&
endfunc
" this was using a NULL pointer after failing to use the pattern
diff --git a/test/old/testdir/test_bufline.vim b/test/old/testdir/test_bufline.vim
index 51b657f00e..bbf1d02079 100644
--- a/test/old/testdir/test_bufline.vim
+++ b/test/old/testdir/test_bufline.vim
@@ -88,6 +88,7 @@ func Test_setline_startup()
endif
call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D')
call system(cmd)
+ sleep 50m
call assert_equal(['Hello'], readfile('Xtest'))
call delete('Xtest')
diff --git a/test/old/testdir/test_profile.vim b/test/old/testdir/test_profile.vim
index d72060a20e..8b4ca74342 100644
--- a/test/old/testdir/test_profile.vim
+++ b/test/old/testdir/test_profile.vim
@@ -44,6 +44,7 @@ func Test_profile_func()
\ . ' --cmd "qall!"')
call assert_equal(0, v:shell_error)
+ sleep 50m
let lines = readfile('Xprofile_func.log')
" - Foo1() is called 3 times but should be reported as called twice
diff --git a/test/old/testdir/test_shell.vim b/test/old/testdir/test_shell.vim
index 7172d5ba33..c50161a8ed 100644
--- a/test/old/testdir/test_shell.vim
+++ b/test/old/testdir/test_shell.vim
@@ -5,6 +5,11 @@ source check.vim
source shared.vim
func Test_shell_options()
+ if has('win32')
+ " FIXME: This test is flaky on MS-Windows.
+ let g:test_is_flaky = 1
+ endif
+
" The expected value of 'shellcmdflag', 'shellpipe', 'shellquote',
" 'shellredir', 'shellxescape', 'shellxquote' for the supported shells.
let shells = []
diff --git a/test/old/testdir/test_undo.vim b/test/old/testdir/test_undo.vim
index 980aa84be6..2d7604b1bf 100644
--- a/test/old/testdir/test_undo.vim
+++ b/test/old/testdir/test_undo.vim
@@ -399,6 +399,11 @@ endfunc
func Test_undofile_earlier()
throw 'Skipped: Nvim does not support test_settime()'
+ if has('win32')
+ " FIXME: This test is flaky on MS-Windows.
+ let g:test_is_flaky = 1
+ endif
+
" Issue #1254
" create undofile with timestamps older than Vim startup time.
let t0 = localtime() - 43200