mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	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 #11082)
			
			
This commit is contained in:
		| @@ -763,6 +763,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost() | |||||||
|  |  | ||||||
|   call writefile(content, 'Xvimrc', 'D') |   call writefile(content, 'Xvimrc', 'D') | ||||||
|   call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq') |   call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq') | ||||||
|  |   sleep 50m | ||||||
|   let errors = join(readfile('Xerrors')) |   let errors = join(readfile('Xerrors')) | ||||||
|   call assert_match('E814:', errors) |   call assert_match('E814:', errors) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -375,6 +375,7 @@ endfunc | |||||||
| func Test_buffer_scheme() | func Test_buffer_scheme() | ||||||
|   CheckMSWindows |   CheckMSWindows | ||||||
|  |  | ||||||
|  |   set noswapfile | ||||||
|   set noshellslash |   set noshellslash | ||||||
|   %bwipe! |   %bwipe! | ||||||
|   let bufnames = [ |   let bufnames = [ | ||||||
| @@ -397,6 +398,7 @@ func Test_buffer_scheme() | |||||||
|   endfor |   endfor | ||||||
|  |  | ||||||
|   set shellslash& |   set shellslash& | ||||||
|  |   set swapfile& | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " this was using a NULL pointer after failing to use the pattern | " this was using a NULL pointer after failing to use the pattern | ||||||
|   | |||||||
| @@ -83,6 +83,7 @@ func Test_setline_startup() | |||||||
|   endif |   endif | ||||||
|   call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D') |   call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D') | ||||||
|   call system(cmd) |   call system(cmd) | ||||||
|  |   sleep 50m | ||||||
|   call assert_equal(['Hello'], readfile('Xtest')) |   call assert_equal(['Hello'], readfile('Xtest')) | ||||||
|  |  | ||||||
|   call delete('Xtest') |   call delete('Xtest') | ||||||
|   | |||||||
| @@ -53,6 +53,7 @@ func RunProfileFunc(command, declare, assign) | |||||||
|     \ . ' -c "qall!"') |     \ . ' -c "qall!"') | ||||||
|   call assert_equal(0, v:shell_error) |   call assert_equal(0, v:shell_error) | ||||||
|  |  | ||||||
|  |   sleep 50m | ||||||
|   let lines = readfile('Xprofile_func.log') |   let lines = readfile('Xprofile_func.log') | ||||||
|  |  | ||||||
|   " - Foo1() is called 3 times but should be reported as called twice |   " - Foo1() is called 3 times but should be reported as called twice | ||||||
|   | |||||||
| @@ -5,6 +5,11 @@ source check.vim | |||||||
| source shared.vim | source shared.vim | ||||||
|  |  | ||||||
| func Test_shell_options() | 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', |   " The expected value of 'shellcmdflag', 'shellpipe', 'shellquote', | ||||||
|   " 'shellredir', 'shellxescape', 'shellxquote' for the supported shells. |   " 'shellredir', 'shellxescape', 'shellxquote' for the supported shells. | ||||||
|   let shells = [] |   let shells = [] | ||||||
|   | |||||||
| @@ -335,6 +335,11 @@ func Test_insert_expr() | |||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_undofile_earlier() | func Test_undofile_earlier() | ||||||
|  |   if has('win32') | ||||||
|  |     " FIXME: This test is flaky on MS-Windows. | ||||||
|  |     let g:test_is_flaky = 1 | ||||||
|  |   endif | ||||||
|  |  | ||||||
|   " Issue #1254 |   " Issue #1254 | ||||||
|   " create undofile with timestamps older than Vim startup time. |   " create undofile with timestamps older than Vim startup time. | ||||||
|   let t0 = localtime() - 43200 |   let t0 = localtime() - 43200 | ||||||
|   | |||||||
| @@ -722,6 +722,7 @@ func Test_viminfo_file_mark_unloaded_buf() | |||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_viminfo_oldfiles() | func Test_viminfo_oldfiles() | ||||||
|  |   set noswapfile | ||||||
|   let v:oldfiles = [] |   let v:oldfiles = [] | ||||||
|   let lines = [ |   let lines = [ | ||||||
| 	\ '# comment line', | 	\ '# comment line', | ||||||
| @@ -765,6 +766,7 @@ func Test_viminfo_oldfiles() | |||||||
|   call assert_equal("/tmp/another.txt", expand("%")) |   call assert_equal("/tmp/another.txt", expand("%")) | ||||||
|   bwipe |   bwipe | ||||||
|   delmark E |   delmark E | ||||||
|  |   set swapfile& | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " Test for storing and restoring buffer list in 'viminfo' | " Test for storing and restoring buffer list in 'viminfo' | ||||||
|   | |||||||
| @@ -703,6 +703,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     415, | ||||||
| /**/ | /**/ | ||||||
|     414, |     414, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user