summaryrefslogtreecommitdiff
path: root/src/testdir/test_terminal3.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_terminal3.vim')
-rw-r--r--src/testdir/test_terminal3.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim
index 76e8a1054..3343dafd8 100644
--- 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