diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-23 18:14:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-23 18:14:56 +0100 |
commit | f637bceb6135139dc1891a15de8fa134c2ca2d97 (patch) | |
tree | 8ea764a485d7cbcb4838b65aed8f7995ab7cfbdf /src | |
parent | 792f786aad8409ca9ab895392742643a5b6aed8f (diff) | |
download | vim-git-f637bceb6135139dc1891a15de8fa134c2ca2d97.tar.gz |
patch 8.2.2035: MS-Windows: some tests may failv8.2.2035
Problem: MS-Windows: some tests may fail.
Solution: Avoid test failures. (Yegappan Lakshmanan, closes #7346)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_channel.vim | 10 | ||||
-rw-r--r-- | src/testdir/test_ex_mode.vim | 1 | ||||
-rw-r--r-- | src/testdir/test_functions.vim | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 21 insertions, 3 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 90d828bdb..e9cc258f0 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -2304,8 +2304,14 @@ endfunc func Test_cb_with_input() let g:wait_exit_cb = 1 - call job_start('echo "Vim''s test"', - \ {'out_cb': 'ExitCb_cb_with_input'}) + if has('win32') + let cmd = 'cmd /c echo "Vim''s test"' + else + let cmd = 'echo "Vim''s test"' + endif + + let job = job_start(cmd, {'out_cb': 'ExitCb_cb_with_input'}) + call WaitFor({-> job_status(job) == "dead"}) call WaitForAssert({-> assert_equal(0, g:wait_exit_cb)}) unlet g:wait_exit_cb diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim index 86687636f..3c6d08efb 100644 --- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -201,6 +201,7 @@ func Test_ex_mode_with_global() call assert_equal(1, RunVim([], [], '-e -s -S Xexmodescript')) call assert_equal(['done'], readfile('Xdidexmode')) + call delete('logfile') call delete('Xdidexmode') call delete('Xexmodescript') endfunc diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index e8c372cd2..fb0b19365 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1273,7 +1273,16 @@ endfunc func Test_executable_longname() CheckMSWindows - let fname = 'X' . repeat('あ', 200) . '.bat' + " Create a temporary .bat file with 205 characters in the name. + " Maximum length of a filename (including the path) on MS-Windows is 259 + " characters. + " See https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation + let len = 259 - getcwd()->len() - 6 + if len > 200 + let len = 200 + endif + + let fname = 'X' . repeat('あ', len) . '.bat' call writefile([], fname) call assert_equal(1, executable(fname)) call delete(fname) diff --git a/src/version.c b/src/version.c index a4ca493ca..ca8164309 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2035, +/**/ 2034, /**/ 2033, |