Skip to content

Commit

Permalink
patch 8.0.0804: running tests fails when stdin is /dev/null
Browse files Browse the repository at this point in the history
Problem:    Running tests fails when stdin is /dev/null. (James McCoy)
Solution:   Do not bail out from getting input if the --not-a-term argument
            was given. (closes #1460)
  • Loading branch information
brammool committed Jul 29, 2017
1 parent c6df10e commit 91d348a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/eval.c
Expand Up @@ -8070,8 +8070,9 @@ get_user_input(
rettv->vval.v_string = NULL;

#ifdef NO_CONSOLE_INPUT
/* While starting up, there is no place to enter text. */
if (no_console_input())
/* While starting up, there is no place to enter text. When running tests
* with --not-a-term we assume feedkeys() will be used. */
if (no_console_input() && !is_not_a_term())
return;
#endif

Expand Down
5 changes: 3 additions & 2 deletions src/evalfunc.c
Expand Up @@ -6482,8 +6482,9 @@ f_inputlist(typval_T *argvars, typval_T *rettv)
int mouse_used;

#ifdef NO_CONSOLE_INPUT
/* While starting up, there is no place to enter text. */
if (no_console_input())
/* While starting up, there is no place to enter text. When running tests
* with --not-a-term we assume feedkeys() will be used. */
if (no_console_input() && !is_not_a_term())
return;
#endif
if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -769,6 +769,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
804,
/**/
803,
/**/
Expand Down

0 comments on commit 91d348a

Please sign in to comment.