patch 9.0.0363: common names in test files causes tests to be flaky
Problem: Common names in test files causes tests to be flaky.
Solution: Use more specific names.
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index bea612f..44fd646 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1083,12 +1083,12 @@
endtry
endwhile
- call writefile(['first', 'second', 'third'], 'Xfile1')
- call writefile([], 'Xfile2')
- call writefile([], 'Xfile3')
+ call writefile(['first', 'second', 'third'], 'Xnorfile1')
+ call writefile([], 'Xnorfile2')
+ call writefile([], 'Xnorfile3')
" Argument list related commands
- args Xfile1 Xfile2 Xfile3
+ args Xnorfile1 Xnorfile2 Xnorfile3
next
for cmd in ['sargument 2', 'snext', 'sprevious', 'sNext', 'srewind',
\ 'sfirst', 'slast']
@@ -1099,13 +1099,13 @@
" Buffer related commands
set modified
hide enew
- for cmd in ['sbuffer Xfile1', 'sbnext', 'sbprevious', 'sbNext', 'sbrewind',
+ for cmd in ['sbuffer Xnorfile1', 'sbnext', 'sbprevious', 'sbNext', 'sbrewind',
\ 'sbfirst', 'sblast', 'sball', 'sbmodified', 'sunhide']
call assert_fails(dir .. cmd, 'E36:')
endfor
" Window related commands
- for cmd in ['split', 'split Xfile2', 'new', 'new Xfile3', 'sview Xfile1',
+ for cmd in ['split', 'split Xnorfile2', 'new', 'new Xnorfile3', 'sview Xnorfile1',
\ 'sfind runtest.vim']
call assert_fails(dir .. cmd, 'E36:')
endfor
@@ -1128,7 +1128,7 @@
call assert_fails(dir .. 'lopen', 'E36:')
" Preview window
- call assert_fails(dir .. 'pedit Xfile2', 'E36:')
+ call assert_fails(dir .. 'pedit Xnorfile2', 'E36:')
call setline(1, 'abc')
call assert_fails(dir .. 'psearch abc', 'E36:')
endif
@@ -1136,15 +1136,15 @@
" Window commands (CTRL-W ^ and CTRL-W f)
if a:dir_arg == 'h'
call assert_fails('call feedkeys("\<C-W>^", "xt")', 'E36:')
- call setline(1, 'Xfile1')
+ call setline(1, 'Xnorfile1')
call assert_fails('call feedkeys("gg\<C-W>f", "xt")', 'E36:')
endif
enew!
" Tag commands (:stag, :stselect and :stjump)
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
- \ "second\tXfile1\t2",
- \ "third\tXfile1\t3",],
+ \ "second\tXnorfile1\t2",
+ \ "third\tXnorfile1\t3",],
\ 'Xtags')
set tags=Xtags
call assert_fails(dir .. 'stag second', 'E36:')
@@ -1166,9 +1166,9 @@
endif
%bwipe!
- call delete('Xfile1')
- call delete('Xfile2')
- call delete('Xfile3')
+ call delete('Xnorfile1')
+ call delete('Xnorfile2')
+ call delete('Xnorfile3')
only
endfunc
@@ -1387,16 +1387,16 @@
" window to another.
func Test_close_dest_window()
split
- edit Xfile
+ edit Xdstfile
" Test for BufLeave
augroup T1
au!
- au BufLeave Xfile $wincmd c
+ au BufLeave Xdstfile $wincmd c
augroup END
wincmd b
call assert_equal(1, winnr('$'))
- call assert_equal('Xfile', @%)
+ call assert_equal('Xdstfile', @%)
augroup T1
au!
augroup END
@@ -1410,7 +1410,7 @@
augroup END
wincmd t
call assert_equal(1, winnr('$'))
- call assert_equal('Xfile', @%)
+ call assert_equal('Xdstfile', @%)
augroup T1
au!
augroup END
@@ -1595,12 +1595,12 @@
call assert_fails('split', 'E342:')
call assert_equal(1, winnr('$'))
- edit Xfile1
- edit Xfile2
+ edit Xwaffile1
+ edit Xwaffile2
call test_alloc_fail(GetAllocId('newwin_wvars'), 0, 0)
- call assert_fails('sb Xfile1', 'E342:')
+ call assert_fails('sb Xwaffile1', 'E342:')
call assert_equal(1, winnr('$'))
- call assert_equal('Xfile2', @%)
+ call assert_equal('Xwaffile2', @%)
%bw!
" FIXME: The following test crashes Vim