Mercurial > vim
changeset 21524:8c6433359913 v8.2.1312
patch 8.2.1312: MS-Windows: terminal test may fail if dir.exe exists
Commit: https://github.com/vim/vim/commit/066b12e36c32a87725303c0f71e968eb3f9a9f32
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 28 21:40:27 2020 +0200
patch 8.2.1312: MS-Windows: terminal test may fail if dir.exe exists
Problem: MS-Windows: terminal test may fail if dir.exe exists.
Solution: Use dir.com. (Ken Takata, closes https://github.com/vim/vim/issues/6557)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 28 Jul 2020 21:45:04 +0200 |
parents | dd0324c03303 |
children | 8c78fe47b321 |
files | src/testdir/test_terminal3.vim src/version.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal3.vim +++ b/src/testdir/test_terminal3.vim @@ -43,15 +43,18 @@ func Test_terminal_shell_option() bwipe! elseif has('win32') " dir is a shell builtin command, should fail without a shell. + " However, if dir.exe (which might be provided by Cygwin/MSYS2) exists in + " the %PATH%, "term dir" succeeds unintentionally. Use dir.com instead. try - term dir /b runtest.vim - call WaitForAssert({-> assert_match('job failed\|cannot access .*: No such file or directory', term_getline(bufnr(), 1))}) + term dir.com /b runtest.vim + call WaitForAssert({-> assert_match('job failed', term_getline(bufnr(), 1))}) catch /CreateProcess/ " ignore endtry bwipe! - term ++shell dir /b runtest.vim + " This should execute the dir builtin command even with ".com". + term ++shell dir.com /b runtest.vim call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))}) bwipe! endif