Mercurial > vim
diff src/testdir/test_autocmd.vim @ 29970:d891115c0aea v9.0.0323
patch 9.0.0323: using common name in tests leads to flaky tests
Commit: https://github.com/vim/vim/commit/3b0d70f4ff436cb144683dafd956e8a3ee485a90
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 29 22:31:20 2022 +0100
patch 9.0.0323: 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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 29 Aug 2022 23:45:04 +0200 |
parents | c8b1a683323c |
children | b2140f61826c |
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -717,14 +717,14 @@ func Test_BufEnter() call assert_equal('++', g:val) " Also get BufEnter when editing a directory - call mkdir('Xdir') - split Xdir + call mkdir('Xbufenterdir') + split Xbufenterdir call assert_equal('+++', g:val) " On MS-Windows we can't edit the directory, make sure we wipe the right " buffer. - bwipe! Xdir - call delete('Xdir', 'd') + bwipe! Xbufenterdir + call delete('Xbufenterdir', 'd') au! BufEnter " Editing a "nofile" buffer doesn't read the file but does trigger BufEnter @@ -2723,16 +2723,16 @@ func Test_throw_in_BufWritePre() endfunc func Test_autocmd_in_try_block() - call mkdir('Xdir') + call mkdir('Xintrydir') au BufEnter * let g:fname = expand('%') try - edit Xdir/ + edit Xintrydir/ endtry - call assert_match('Xdir', g:fname) + call assert_match('Xintrydir', g:fname) unlet g:fname au! BufEnter - call delete('Xdir', 'rf') + call delete('Xintrydir', 'rf') endfunc func Test_autocmd_SafeState()