Mercurial > vim
diff src/testdir/test_autocmd.vim @ 29997:98f5a0618a77 v9.0.0336
patch 9.0.0336: tests are flaky because of using a common file name
Commit: https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 21:46:08 2022 +0100
patch 9.0.0336: tests are flaky because of using a common file name
Problem: Tests are flaky because of using a common file name.
Solution: Rename files and directories to be more unique.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Aug 2022 23:00:05 +0200 |
parents | b2140f61826c |
children | 13b02c1ea0f7 |
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -2229,7 +2229,7 @@ function Test_dirchanged_auto() set acd cd .. call assert_equal([], s:li) - exe 'edit ' . s:dir_foo . '/Xfile' + exe 'edit ' . s:dir_foo . '/Xautofile' call assert_equal(s:dir_foo, getcwd()) let expected = ["pre cd " .. s:dir_foo, "auto:", s:dir_foo] call assert_equal(expected, s:li) @@ -2906,7 +2906,7 @@ func Test_FileChangedRO_winclose() augroup FileChangedROTest au! - autocmd FileChangedRO * edit Xfile + autocmd FileChangedRO * edit Xrofile augroup END new set readonly @@ -2982,13 +2982,13 @@ endfunc " Test for passing invalid arguments to autocmd func Test_autocmd_invalid_args() " Additional character after * for event - call assert_fails('autocmd *a Xfile set ff=unix', 'E215:') + call assert_fails('autocmd *a Xinvfile set ff=unix', 'E215:') augroup Test augroup END " Invalid autocmd event - call assert_fails('autocmd Bufabc Xfile set ft=vim', 'E216:') + call assert_fails('autocmd Bufabc Xinvfile set ft=vim', 'E216:') " Invalid autocmd event in a autocmd group - call assert_fails('autocmd Test Bufabc Xfile set ft=vim', 'E216:') + call assert_fails('autocmd Test Bufabc Xinvfile set ft=vim', 'E216:') augroup! Test " Execute all autocmds call assert_fails('doautocmd * BufEnter', 'E217:') @@ -2999,9 +2999,9 @@ endfunc " Test for deep nesting of autocmds func Test_autocmd_deep_nesting() - autocmd BufEnter Xfile doautocmd BufEnter Xfile - call assert_fails('doautocmd BufEnter Xfile', 'E218:') - autocmd! BufEnter Xfile + autocmd BufEnter Xdeepfile doautocmd BufEnter Xdeepfile + call assert_fails('doautocmd BufEnter Xdeepfile', 'E218:') + autocmd! BufEnter Xdeepfile endfunc " Tests for SigUSR1 autocmd event, which is only available on posix systems.