mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.0031: MS-Windows: test for empty job fails
Problem: MS-Windows: test for empty job fails Solution: Check for error message, make it also fail on Unix.
This commit is contained in:
@@ -5943,11 +5943,19 @@ job_start(
|
|||||||
|
|
||||||
if (build_argv_from_list(l, &argv, &argc) == FAIL)
|
if (build_argv_from_list(l, &argv, &argc) == FAIL)
|
||||||
goto theend;
|
goto theend;
|
||||||
#ifndef USE_ARGV
|
|
||||||
|
// Empty command is invalid.
|
||||||
|
#ifdef USE_ARGV
|
||||||
|
if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL)
|
||||||
|
{
|
||||||
|
emsg(_(e_invarg));
|
||||||
|
goto theend;
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (win32_build_cmd(l, &ga) == FAIL)
|
if (win32_build_cmd(l, &ga) == FAIL)
|
||||||
goto theend;
|
goto theend;
|
||||||
cmd = ga.ga_data;
|
cmd = ga.ga_data;
|
||||||
if (cmd == NULL)
|
if (cmd == NULL || *skipwhite(cmd) == NUL)
|
||||||
{
|
{
|
||||||
emsg(_(e_invarg));
|
emsg(_(e_invarg));
|
||||||
goto theend;
|
goto theend;
|
||||||
|
@@ -1960,8 +1960,8 @@ endfunc
|
|||||||
|
|
||||||
func Test_empty_job()
|
func Test_empty_job()
|
||||||
" This was crashing on MS-Windows.
|
" This was crashing on MS-Windows.
|
||||||
let job = job_start([""])
|
call assert_fails('let job = job_start([""])', 'E474:')
|
||||||
call WaitForAssert({-> assert_equal("dead", job_status(job))})
|
call assert_fails('let job = job_start([" "])', 'E474:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Do this last, it stops any channel log.
|
" Do this last, it stops any channel log.
|
||||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
31,
|
||||||
/**/
|
/**/
|
||||||
30,
|
30,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user