diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-30 21:46:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-30 21:46:08 +0100 |
commit | 61abe7d8f827ec31f098e8abcdf58846b956ef16 (patch) | |
tree | 0cf4ec692b77aeb1be2c1a38d3ff32973aaca45e /src/testdir/test_edit.vim | |
parent | 9b03d3e75b4274493bbe76772d7b92238791964c (diff) |
patch 9.0.0336: tests are flaky because of using a common file namev9.0.0336
Problem: Tests are flaky because of using a common file name.
Solution: Rename files and directories to be more unique.
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r-- | src/testdir/test_edit.vim | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim index a568fb2dc2..a2d2b5e787 100644 --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -424,7 +424,7 @@ endfunc " terminal. func Test_autoindent_remove_indent() CheckRunVimInTerminal - let buf = RunVimInTerminal('-N Xfile', {'rows': 6, 'cols' : 20}) + let buf = RunVimInTerminal('-N Xarifile', {'rows': 6, 'cols' : 20}) call TermWait(buf) call term_sendkeys(buf, ":set autoindent\n") " leaving insert mode in a new line with indent added by autoindent, should @@ -442,8 +442,8 @@ func Test_autoindent_remove_indent() call term_sendkeys(buf, ":w\n") call TermWait(buf) call StopVimInTerminal(buf) - call assert_equal(["\tfoo", '', repeat('x', 20)], readfile('Xfile')) - call delete('Xfile') + call assert_equal(["\tfoo", '', repeat('x', 20)], readfile('Xarifile')) + call delete('Xarifile') endfunc func Test_edit_CR() @@ -1530,7 +1530,7 @@ func Test_edit_complete_very_long_name() let longfilename = longdirname . '/' . repeat('a', 255) call writefile(['Totum', 'Table'], longfilename) new - exe "next Xfile " . longfilename + exe "next Xnofile " . longfilename exe "normal iT\<C-N>" bwipe! @@ -1754,19 +1754,19 @@ endfunc " Test for editing a file using invalid file encoding func Test_edit_invalid_encoding() CheckEnglish - call writefile([], 'Xfile') + call writefile([], 'Xinvfile') redir => msg - new ++enc=axbyc Xfile + new ++enc=axbyc Xinvfile redir END call assert_match('\[NOT converted\]', msg) - call delete('Xfile') + call delete('Xinvfile') close! endfunc " Test for the "charconvert" option func Test_edit_charconvert() CheckEnglish - call writefile(['one', 'two'], 'Xfile') + call writefile(['one', 'two'], 'Xccfile') " set 'charconvert' to a non-existing function set charconvert=NonExitingFunc() @@ -1774,7 +1774,7 @@ func Test_edit_charconvert() let caught_e117 = v:false try redir => msg - edit ++enc=axbyc Xfile + edit ++enc=axbyc Xccfile catch /E117:/ let caught_e117 = v:true finally @@ -1792,7 +1792,7 @@ func Test_edit_charconvert() set charconvert=Cconv1() new redir => msg - edit ++enc=axbyc Xfile + edit ++enc=axbyc Xccfile redir END call assert_equal(['one', 'two'], getline(1, '$')) call assert_match("can't read output of 'charconvert'", msg) @@ -1807,10 +1807,10 @@ func Test_edit_charconvert() call writefile(data, v:fname_out) endfunc set charconvert=Cconv2() - new Xfile - write ++enc=ucase Xfile1 - call assert_equal(['ONE', 'TWO'], readfile('Xfile1')) - call delete('Xfile1') + new Xccfile + write ++enc=ucase Xccfile1 + call assert_equal(['ONE', 'TWO'], readfile('Xccfile1')) + call delete('Xccfile1') close! delfunc Cconv2 set charconvert& @@ -1821,13 +1821,13 @@ func Test_edit_charconvert() endfunc set charconvert=Cconv3() new - call assert_fails('edit ++enc=lcase Xfile', 'E202:') + call assert_fails('edit ++enc=lcase Xccfile', 'E202:') call assert_equal([''], getline(1, '$')) close! delfunc Cconv3 set charconvert& - call delete('Xfile') + call delete('Xccfile') endfunc " Test for editing a file without read permission @@ -1835,17 +1835,17 @@ func Test_edit_file_no_read_perm() CheckUnix CheckNotRoot - call writefile(['one', 'two'], 'Xfile') - call setfperm('Xfile', '-w-------') + call writefile(['one', 'two'], 'Xnrpfile') + call setfperm('Xnrpfile', '-w-------') new redir => msg - edit Xfile + edit Xnrpfile redir END call assert_equal(1, &readonly) call assert_equal([''], getline(1, '$')) call assert_match('\[Permission Denied\]', msg) close! - call delete('Xfile') + call delete('Xnrpfile') endfunc " Using :edit without leaving 'insertmode' should not cause Insert mode to be |