mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	patch 9.0.0313: using common name in tests leads to flaky tests
Problem: Using common name in tests leads to flaky tests. Solution: Rename files and directories to be more specific.
This commit is contained in:
		| @@ -56,10 +56,10 @@ func Test_acd_win_execute() | |||||||
|   set acd |   set acd | ||||||
|   call test_autochdir() |   call test_autochdir() | ||||||
|  |  | ||||||
|   call mkdir('Xfile') |   call mkdir('XacdDir') | ||||||
|   let winid = win_getid() |   let winid = win_getid() | ||||||
|   new Xfile/file |   new XacdDir/file | ||||||
|   call assert_match('testdir.Xfile$', getcwd()) |   call assert_match('testdir.XacdDir$', getcwd()) | ||||||
|   cd .. |   cd .. | ||||||
|   call assert_match('testdir$', getcwd()) |   call assert_match('testdir$', getcwd()) | ||||||
|   call win_execute(winid, 'echo') |   call win_execute(winid, 'echo') | ||||||
| @@ -68,7 +68,7 @@ func Test_acd_win_execute() | |||||||
|   bwipe! |   bwipe! | ||||||
|   set noacd |   set noacd | ||||||
|   call chdir(cwd) |   call chdir(cwd) | ||||||
|   call delete('Xfile', 'rf') |   call delete('XacdDir', 'rf') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_verbose_pwd() | func Test_verbose_pwd() | ||||||
|   | |||||||
| @@ -24,29 +24,29 @@ endfunc | |||||||
| " Test for the CursorHold autocmd | " Test for the CursorHold autocmd | ||||||
| func Test_CursorHold_autocmd() | func Test_CursorHold_autocmd() | ||||||
|   CheckRunVimInTerminal |   CheckRunVimInTerminal | ||||||
|   call writefile(['one', 'two', 'three'], 'Xfile') |   call writefile(['one', 'two', 'three'], 'XoneTwoThree') | ||||||
|   let before =<< trim END |   let before =<< trim END | ||||||
|     set updatetime=10 |     set updatetime=10 | ||||||
|     au CursorHold * call writefile([line('.')], 'Xoutput', 'a') |     au CursorHold * call writefile([line('.')], 'XCHoutput', 'a') | ||||||
|   END |   END | ||||||
|   call writefile(before, 'Xinit') |   call writefile(before, 'XCHinit') | ||||||
|   let buf = RunVimInTerminal('-S Xinit Xfile', {}) |   let buf = RunVimInTerminal('-S XCHinit XoneTwoThree', {}) | ||||||
|   call term_sendkeys(buf, "G") |   call term_sendkeys(buf, "G") | ||||||
|   call term_wait(buf, 50) |   call term_wait(buf, 50) | ||||||
|   call term_sendkeys(buf, "gg") |   call term_sendkeys(buf, "gg") | ||||||
|   call term_wait(buf) |   call term_wait(buf) | ||||||
|   call WaitForAssert({-> assert_equal(['1'], readfile('Xoutput')[-1:-1])}) |   call WaitForAssert({-> assert_equal(['1'], readfile('XCHoutput')[-1:-1])}) | ||||||
|   call term_sendkeys(buf, "j") |   call term_sendkeys(buf, "j") | ||||||
|   call term_wait(buf) |   call term_wait(buf) | ||||||
|   call WaitForAssert({-> assert_equal(['1', '2'], readfile('Xoutput')[-2:-1])}) |   call WaitForAssert({-> assert_equal(['1', '2'], readfile('XCHoutput')[-2:-1])}) | ||||||
|   call term_sendkeys(buf, "j") |   call term_sendkeys(buf, "j") | ||||||
|   call term_wait(buf) |   call term_wait(buf) | ||||||
|   call WaitForAssert({-> assert_equal(['1', '2', '3'], readfile('Xoutput')[-3:-1])}) |   call WaitForAssert({-> assert_equal(['1', '2', '3'], readfile('XCHoutput')[-3:-1])}) | ||||||
|   call StopVimInTerminal(buf) |   call StopVimInTerminal(buf) | ||||||
|  |  | ||||||
|   call delete('Xinit') |   call delete('XCHinit') | ||||||
|   call delete('Xoutput') |   call delete('XCHoutput') | ||||||
|   call delete('Xfile') |   call delete('XoneTwoThree') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| if has('timers') | if has('timers') | ||||||
| @@ -1521,21 +1521,21 @@ endfunc | |||||||
|  |  | ||||||
| " Test for Bufleave autocommand that deletes the buffer we are about to edit. | " Test for Bufleave autocommand that deletes the buffer we are about to edit. | ||||||
| func Test_BufleaveWithDelete() | func Test_BufleaveWithDelete() | ||||||
|   new | edit Xfile1 |   new | edit XbufLeave1 | ||||||
|  |  | ||||||
|   augroup test_bufleavewithdelete |   augroup test_bufleavewithdelete | ||||||
|       autocmd! |       autocmd! | ||||||
|       autocmd BufLeave Xfile1 bwipe Xfile2 |       autocmd BufLeave XbufLeave1 bwipe XbufLeave2 | ||||||
|   augroup END |   augroup END | ||||||
|  |  | ||||||
|   call assert_fails('edit Xfile2', 'E143:') |   call assert_fails('edit XbufLeave2', 'E143:') | ||||||
|   call assert_equal('Xfile1', bufname('%')) |   call assert_equal('XbufLeave1', bufname('%')) | ||||||
|  |  | ||||||
|   autocmd! test_bufleavewithdelete BufLeave Xfile1 |   autocmd! test_bufleavewithdelete BufLeave XbufLeave1 | ||||||
|   augroup! test_bufleavewithdelete |   augroup! test_bufleavewithdelete | ||||||
|  |  | ||||||
|   new |   new | ||||||
|   bwipe! Xfile1 |   bwipe! XbufLeave1 | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " Test for autocommand that changes the buffer list, when doing ":ball". | " Test for autocommand that changes the buffer list, when doing ":ball". | ||||||
| @@ -3007,13 +3007,13 @@ endfunc | |||||||
| func Test_BufReadPre_delfile() | func Test_BufReadPre_delfile() | ||||||
|   augroup TestAuCmd |   augroup TestAuCmd | ||||||
|     au! |     au! | ||||||
|     autocmd BufReadPre Xfile call delete('Xfile') |     autocmd BufReadPre XbufreadPre call delete('XbufreadPre') | ||||||
|   augroup END |   augroup END | ||||||
|   call writefile([], 'Xfile') |   call writefile([], 'XbufreadPre') | ||||||
|   call assert_fails('new Xfile', 'E200:') |   call assert_fails('new XbufreadPre', 'E200:') | ||||||
|   call assert_equal('Xfile', @%) |   call assert_equal('XbufreadPre', @%) | ||||||
|   call assert_equal(1, &readonly) |   call assert_equal(1, &readonly) | ||||||
|   call delete('Xfile') |   call delete('XbufreadPre') | ||||||
|   augroup TestAuCmd |   augroup TestAuCmd | ||||||
|     au! |     au! | ||||||
|   augroup END |   augroup END | ||||||
| @@ -3024,13 +3024,13 @@ endfunc | |||||||
| func Test_BufReadPre_changebuf() | func Test_BufReadPre_changebuf() | ||||||
|   augroup TestAuCmd |   augroup TestAuCmd | ||||||
|     au! |     au! | ||||||
|     autocmd BufReadPre Xfile edit Xsomeotherfile |     autocmd BufReadPre Xchangebuf edit Xsomeotherfile | ||||||
|   augroup END |   augroup END | ||||||
|   call writefile([], 'Xfile') |   call writefile([], 'Xchangebuf') | ||||||
|   call assert_fails('new Xfile', 'E201:') |   call assert_fails('new Xchangebuf', 'E201:') | ||||||
|   call assert_equal('Xsomeotherfile', @%) |   call assert_equal('Xsomeotherfile', @%) | ||||||
|   call assert_equal(1, &readonly) |   call assert_equal(1, &readonly) | ||||||
|   call delete('Xfile') |   call delete('Xchangebuf') | ||||||
|   augroup TestAuCmd |   augroup TestAuCmd | ||||||
|     au! |     au! | ||||||
|   augroup END |   augroup END | ||||||
|   | |||||||
| @@ -78,11 +78,11 @@ endfunc | |||||||
| " Test for using a non-existing directory as a backup directory | " Test for using a non-existing directory as a backup directory | ||||||
| func Test_non_existing_backupdir() | func Test_non_existing_backupdir() | ||||||
|   set backupdir=./non_existing_dir backupskip= |   set backupdir=./non_existing_dir backupskip= | ||||||
|   call writefile(['line1'], 'Xfile') |   call writefile(['line1'], 'Xbackupdir') | ||||||
|   new Xfile |   new Xbackupdir | ||||||
|   call assert_fails('write', 'E510:') |   call assert_fails('write', 'E510:') | ||||||
|   set backupdir&vim backupskip&vim |   set backupdir&vim backupskip&vim | ||||||
|   call delete('Xfile') |   call delete('Xbackupdir') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " vim: shiftwidth=2 sts=2 expandtab | " vim: shiftwidth=2 sts=2 expandtab | ||||||
|   | |||||||
| @@ -76,14 +76,14 @@ func Test_buflist_browse() | |||||||
|   %bwipe! |   %bwipe! | ||||||
|   call assert_fails('buffer 1000', 'E86:') |   call assert_fails('buffer 1000', 'E86:') | ||||||
|  |  | ||||||
|   call writefile(['foo1', 'foo2', 'foo3', 'foo4'], 'Xfile1') |   call writefile(['foo1', 'foo2', 'foo3', 'foo4'], 'Xbrowse1') | ||||||
|   call writefile(['bar1', 'bar2', 'bar3', 'bar4'], 'Xfile2') |   call writefile(['bar1', 'bar2', 'bar3', 'bar4'], 'Xbrowse2') | ||||||
|   call writefile(['baz1', 'baz2', 'baz3', 'baz4'], 'Xfile3') |   call writefile(['baz1', 'baz2', 'baz3', 'baz4'], 'Xbrowse3') | ||||||
|   edit Xfile1 |   edit Xbrowse1 | ||||||
|   let b1 = bufnr() |   let b1 = bufnr() | ||||||
|   edit Xfile2 |   edit Xbrowse2 | ||||||
|   let b2 = bufnr() |   let b2 = bufnr() | ||||||
|   edit +/baz4 Xfile3 |   edit +/baz4 Xbrowse3 | ||||||
|   let b3 = bufnr() |   let b3 = bufnr() | ||||||
|  |  | ||||||
|   call assert_fails('buffer ' .. b1 .. ' abc', 'E488:') |   call assert_fails('buffer ' .. b1 .. ' abc', 'E488:') | ||||||
| @@ -127,9 +127,9 @@ func Test_buflist_browse() | |||||||
|  |  | ||||||
|   call assert_fails('sandbox bnext', 'E48:') |   call assert_fails('sandbox bnext', 'E48:') | ||||||
|  |  | ||||||
|   call delete('Xfile1') |   call delete('Xbrowse1') | ||||||
|   call delete('Xfile2') |   call delete('Xbrowse2') | ||||||
|   call delete('Xfile3') |   call delete('Xbrowse3') | ||||||
|   %bwipe! |   %bwipe! | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| @@ -200,39 +200,39 @@ endfunc | |||||||
| " Test for quitting the 'swapfile exists' dialog with the split buffer | " Test for quitting the 'swapfile exists' dialog with the split buffer | ||||||
| " command. | " command. | ||||||
| func Test_buffer_sbuf_cleanup() | func Test_buffer_sbuf_cleanup() | ||||||
|   call writefile([], 'Xfile') |   call writefile([], 'XsplitCleanup') | ||||||
|   " first open the file in a buffer |   " first open the file in a buffer | ||||||
|   new Xfile |   new XsplitCleanup | ||||||
|   let bnr = bufnr() |   let bnr = bufnr() | ||||||
|   close |   close | ||||||
|   " create the swap file |   " create the swap file | ||||||
|   call writefile([], '.Xfile.swp') |   call writefile([], '.XsplitCleanup.swp') | ||||||
|   " Remove the catch-all that runtest.vim adds |   " Remove the catch-all that runtest.vim adds | ||||||
|   au! SwapExists |   au! SwapExists | ||||||
|   augroup BufTest |   augroup BufTest | ||||||
|     au! |     au! | ||||||
|     autocmd SwapExists Xfile let v:swapchoice='q' |     autocmd SwapExists XsplitCleanup let v:swapchoice='q' | ||||||
|   augroup END |   augroup END | ||||||
|   exe 'sbuf ' . bnr |   exe 'sbuf ' . bnr | ||||||
|   call assert_equal(1, winnr('$')) |   call assert_equal(1, winnr('$')) | ||||||
|   call assert_equal(0, getbufinfo('Xfile')[0].loaded) |   call assert_equal(0, getbufinfo('XsplitCleanup')[0].loaded) | ||||||
|  |  | ||||||
|   " test for :sball |   " test for :sball | ||||||
|   sball |   sball | ||||||
|   call assert_equal(1, winnr('$')) |   call assert_equal(1, winnr('$')) | ||||||
|   call assert_equal(0, getbufinfo('Xfile')[0].loaded) |   call assert_equal(0, getbufinfo('XsplitCleanup')[0].loaded) | ||||||
|  |  | ||||||
|   %bw! |   %bw! | ||||||
|   set shortmess+=F |   set shortmess+=F | ||||||
|   let v:statusmsg = '' |   let v:statusmsg = '' | ||||||
|   edit Xfile |   edit XsplitCleanup | ||||||
|   call assert_equal('', v:statusmsg) |   call assert_equal('', v:statusmsg) | ||||||
|   call assert_equal(1, winnr('$')) |   call assert_equal(1, winnr('$')) | ||||||
|   call assert_equal(0, getbufinfo('Xfile')[0].loaded) |   call assert_equal(0, getbufinfo('XsplitCleanup')[0].loaded) | ||||||
|   set shortmess& |   set shortmess& | ||||||
|  |  | ||||||
|   call delete('Xfile') |   call delete('XsplitCleanup') | ||||||
|   call delete('.Xfile.swp') |   call delete('.XsplitCleanup.swp') | ||||||
|   augroup BufTest |   augroup BufTest | ||||||
|     au! |     au! | ||||||
|   augroup END |   augroup END | ||||||
| @@ -261,35 +261,35 @@ func Test_goto_buf_with_confirm() | |||||||
|   CheckUnix |   CheckUnix | ||||||
|   CheckNotGui |   CheckNotGui | ||||||
|   CheckFeature dialog_con |   CheckFeature dialog_con | ||||||
|   new Xfile |   new XgotoConf | ||||||
|   enew |   enew | ||||||
|   call setline(1, 'test') |   call setline(1, 'test') | ||||||
|   call assert_fails('b Xfile', 'E37:') |   call assert_fails('b XgotoConf', 'E37:') | ||||||
|   call feedkeys('c', 'L') |   call feedkeys('c', 'L') | ||||||
|   call assert_fails('confirm b Xfile', 'E37:') |   call assert_fails('confirm b XgotoConf', 'E37:') | ||||||
|   call assert_equal(1, &modified) |   call assert_equal(1, &modified) | ||||||
|   call assert_equal('', @%) |   call assert_equal('', @%) | ||||||
|   call feedkeys('y', 'L') |   call feedkeys('y', 'L') | ||||||
|   call assert_fails('confirm b Xfile', ['', 'E37:']) |   call assert_fails('confirm b XgotoConf', ['', 'E37:']) | ||||||
|   call assert_equal(1, &modified) |   call assert_equal(1, &modified) | ||||||
|   call assert_equal('', @%) |   call assert_equal('', @%) | ||||||
|   call feedkeys('n', 'L') |   call feedkeys('n', 'L') | ||||||
|   confirm b Xfile |   confirm b XgotoConf | ||||||
|   call assert_equal('Xfile', @%) |   call assert_equal('XgotoConf', @%) | ||||||
|   close! |   close! | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " Test for splitting buffer with 'switchbuf' | " Test for splitting buffer with 'switchbuf' | ||||||
| func Test_buffer_switchbuf() | func Test_buffer_switchbuf() | ||||||
|   new Xfile |   new Xswitchbuf | ||||||
|   wincmd w |   wincmd w | ||||||
|   set switchbuf=useopen |   set switchbuf=useopen | ||||||
|   sbuf Xfile |   sbuf Xswitchbuf | ||||||
|   call assert_equal(1, winnr()) |   call assert_equal(1, winnr()) | ||||||
|   call assert_equal(2, winnr('$')) |   call assert_equal(2, winnr('$')) | ||||||
|   set switchbuf=usetab |   set switchbuf=usetab | ||||||
|   tabnew |   tabnew | ||||||
|   sbuf Xfile |   sbuf Xswitchbuf | ||||||
|   call assert_equal(1, tabpagenr()) |   call assert_equal(1, tabpagenr()) | ||||||
|   call assert_equal(2, tabpagenr('$')) |   call assert_equal(2, tabpagenr('$')) | ||||||
|   set switchbuf& |   set switchbuf& | ||||||
| @@ -301,11 +301,11 @@ func Test_bufadd_autocmd_bwipe() | |||||||
|   %bw! |   %bw! | ||||||
|   augroup BufAdd_Wipe |   augroup BufAdd_Wipe | ||||||
|     au! |     au! | ||||||
|     autocmd BufAdd Xfile %bw! |     autocmd BufAdd Xbwipe %bw! | ||||||
|   augroup END |   augroup END | ||||||
|   edit Xfile |   edit Xbwipe | ||||||
|   call assert_equal('', @%) |   call assert_equal('', @%) | ||||||
|   call assert_equal(0, bufexists('Xfile')) |   call assert_equal(0, bufexists('Xbwipe')) | ||||||
|   augroup BufAdd_Wipe |   augroup BufAdd_Wipe | ||||||
|     au! |     au! | ||||||
|   augroup END |   augroup END | ||||||
| @@ -325,40 +325,40 @@ endfunc | |||||||
| " Test for using CTRL-^ to edit the alternative file keeping the cursor | " Test for using CTRL-^ to edit the alternative file keeping the cursor | ||||||
| " position with 'nostartofline'. Also test using the 'buf' command. | " position with 'nostartofline'. Also test using the 'buf' command. | ||||||
| func Test_buffer_edit_altfile() | func Test_buffer_edit_altfile() | ||||||
|   call writefile(repeat(['one two'], 50), 'Xfile1') |   call writefile(repeat(['one two'], 50), 'Xaltfile1') | ||||||
|   call writefile(repeat(['five six'], 50), 'Xfile2') |   call writefile(repeat(['five six'], 50), 'Xaltfile2') | ||||||
|   set nosol |   set nosol | ||||||
|   edit Xfile1 |   edit Xaltfile1 | ||||||
|   call cursor(25, 5) |   call cursor(25, 5) | ||||||
|   edit Xfile2 |   edit Xaltfile2 | ||||||
|   call cursor(30, 4) |   call cursor(30, 4) | ||||||
|   exe "normal \<C-^>" |   exe "normal \<C-^>" | ||||||
|   call assert_equal([0, 25, 5, 0], getpos('.')) |   call assert_equal([0, 25, 5, 0], getpos('.')) | ||||||
|   exe "normal \<C-^>" |   exe "normal \<C-^>" | ||||||
|   call assert_equal([0, 30, 4, 0], getpos('.')) |   call assert_equal([0, 30, 4, 0], getpos('.')) | ||||||
|   buf Xfile1 |   buf Xaltfile1 | ||||||
|   call assert_equal([0, 25, 5, 0], getpos('.')) |   call assert_equal([0, 25, 5, 0], getpos('.')) | ||||||
|   buf Xfile2 |   buf Xaltfile2 | ||||||
|   call assert_equal([0, 30, 4, 0], getpos('.')) |   call assert_equal([0, 30, 4, 0], getpos('.')) | ||||||
|   set sol& |   set sol& | ||||||
|   call delete('Xfile1') |   call delete('Xaltfile1') | ||||||
|   call delete('Xfile2') |   call delete('Xaltfile2') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " Test for running the :sball command with a maximum window count and a | " Test for running the :sball command with a maximum window count and a | ||||||
| " modified buffer | " modified buffer | ||||||
| func Test_sball_with_count() | func Test_sball_with_count() | ||||||
|   %bw! |   %bw! | ||||||
|   edit Xfile1 |   edit Xcountfile1 | ||||||
|   call setline(1, ['abc']) |   call setline(1, ['abc']) | ||||||
|   new Xfile2 |   new Xcountfile2 | ||||||
|   new Xfile3 |   new Xcountfile3 | ||||||
|   new Xfile4 |   new Xcountfile4 | ||||||
|   2sball |   2sball | ||||||
|   call assert_equal(bufnr('Xfile4'), winbufnr(1)) |   call assert_equal(bufnr('Xcountfile4'), winbufnr(1)) | ||||||
|   call assert_equal(bufnr('Xfile1'), winbufnr(2)) |   call assert_equal(bufnr('Xcountfile1'), winbufnr(2)) | ||||||
|   call assert_equal(0, getbufinfo('Xfile2')[0].loaded) |   call assert_equal(0, getbufinfo('Xcountfile2')[0].loaded) | ||||||
|   call assert_equal(0, getbufinfo('Xfile3')[0].loaded) |   call assert_equal(0, getbufinfo('Xcountfile3')[0].loaded) | ||||||
|   %bw! |   %bw! | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| @@ -451,18 +451,18 @@ endfunc | |||||||
| func Test_buflist_alloc_failure() | func Test_buflist_alloc_failure() | ||||||
|   %bw! |   %bw! | ||||||
|  |  | ||||||
|   edit Xfile1 |   edit XallocFail1 | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('edit Xfile2', 'E342:') |   call assert_fails('edit XallocFail2', 'E342:') | ||||||
|  |  | ||||||
|   " test for bufadd() |   " test for bufadd() | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('call bufadd("Xbuffer")', 'E342:') |   call assert_fails('call bufadd("Xbuffer")', 'E342:') | ||||||
|  |  | ||||||
|   " test for setting the arglist |   " test for setting the arglist | ||||||
|   edit Xfile2 |   edit XallocFail2 | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('next Xfile3', 'E342:') |   call assert_fails('next XallocFail3', 'E342:') | ||||||
|  |  | ||||||
|   " test for setting the alternate buffer name when writing a file |   " test for setting the alternate buffer name when writing a file | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
| @@ -489,17 +489,17 @@ func Test_buflist_alloc_failure() | |||||||
|   endif |   endif | ||||||
|  |  | ||||||
|   " test for loading a new buffer after wiping out all the buffers |   " test for loading a new buffer after wiping out all the buffers | ||||||
|   edit Xfile4 |   edit XallocFail4 | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('%bw!', 'E342:') |   call assert_fails('%bw!', 'E342:') | ||||||
|  |  | ||||||
|   " test for :checktime loading the buffer |   " test for :checktime loading the buffer | ||||||
|   call writefile(['one'], 'Xfile5') |   call writefile(['one'], 'XallocFail5') | ||||||
|   if has('unix') |   if has('unix') | ||||||
|     edit Xfile5 |     edit XallocFail5 | ||||||
|     " sleep for some time to make sure the timestamp is different |     " sleep for some time to make sure the timestamp is different | ||||||
|     sleep 200m |     sleep 200m | ||||||
|     call writefile(['two'], 'Xfile5') |     call writefile(['two'], 'XallocFail5') | ||||||
|     set autoread |     set autoread | ||||||
|     call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |     call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|     call assert_fails('checktime', 'E342:') |     call assert_fails('checktime', 'E342:') | ||||||
| @@ -509,12 +509,12 @@ func Test_buflist_alloc_failure() | |||||||
|  |  | ||||||
|   " test for :vimgrep loading a dummy buffer |   " test for :vimgrep loading a dummy buffer | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('vimgrep two Xfile5', 'E342:') |   call assert_fails('vimgrep two XallocFail5', 'E342:') | ||||||
|   call delete('Xfile5') |   call delete('XallocFail5') | ||||||
|  |  | ||||||
|   " test for quickfix command loading a buffer |   " test for quickfix command loading a buffer | ||||||
|   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) |   call test_alloc_fail(GetAllocId('newbuf_bvars'), 0, 0) | ||||||
|   call assert_fails('cexpr "Xfile6:10:Line10"', 'E342:') |   call assert_fails('cexpr "XallocFail6:10:Line10"', 'E342:') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| " vim: shiftwidth=2 sts=2 expandtab | " vim: shiftwidth=2 sts=2 expandtab | ||||||
|   | |||||||
| @@ -707,6 +707,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 */ | ||||||
|  | /**/ | ||||||
|  |     313, | ||||||
| /**/ | /**/ | ||||||
|     312, |     312, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user