patch 8.1.2255: ":term ++shell" does not work on MS-Windows
Problem: ":term ++shell" does not work on MS-Windows.
Solution: Add MS-Windows support.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 1a126b9..ba17959 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -2215,15 +2215,25 @@
endfunc
func Test_terminal_shell_option()
- CheckUnix
- " exec is a shell builtin command, should fail without a shell.
- term exec ls runtest.vim
- call WaitForAssert({-> assert_match('job failed', term_getline(bufnr(), 1))})
- bwipe!
+ if has('unix')
+ " exec is a shell builtin command, should fail without a shell.
+ term exec ls runtest.vim
+ call WaitForAssert({-> assert_match('job failed', term_getline(bufnr(), 1))})
+ bwipe!
- term ++shell exec ls runtest.vim
- call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))})
- bwipe!
+ term ++shell exec ls runtest.vim
+ call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))})
+ bwipe!
+ elseif has('win32')
+ " dir is a shell builtin command, should fail without a shell.
+ term dir /b runtest.vim
+ call WaitForAssert({-> assert_match('job failed', term_getline(bufnr(), 1))})
+ bwipe!
+
+ term ++shell dir /b runtest.vim
+ call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))})
+ bwipe!
+ endif
endfunc
func Test_terminal_setapi_and_call()