patch 8.1.2251: ":term command" may not work without a shell
Problem: ":term command" may not work without a shell.
Solution: Add the ++shell option to :term. (closes #3340)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 9aae680..1a126b9 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -2214,6 +2214,18 @@
call delete('Xtext')
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!
+
+ term ++shell exec ls runtest.vim
+ call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))})
+ bwipe!
+endfunc
+
func Test_terminal_setapi_and_call()
if !CanRunVimInTerminal()
return