Skip to content

Commit 91d348a

Browse files
committed
patch 8.0.0804: running tests fails when stdin is /dev/null
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)
1 parent c6df10e commit 91d348a

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/eval.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8070,8 +8070,9 @@ get_user_input(
80708070
rettv->vval.v_string = NULL;
80718071

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

src/evalfunc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6482,8 +6482,9 @@ f_inputlist(typval_T *argvars, typval_T *rettv)
64826482
int mouse_used;
64836483

64846484
#ifdef NO_CONSOLE_INPUT
6485-
/* While starting up, there is no place to enter text. */
6486-
if (no_console_input())
6485+
/* While starting up, there is no place to enter text. When running tests
6486+
* with --not-a-term we assume feedkeys() will be used. */
6487+
if (no_console_input() && !is_not_a_term())
64876488
return;
64886489
#endif
64896490
if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
804,
772774
/**/
773775
803,
774776
/**/

0 commit comments

Comments
 (0)