]> granicus.if.org Git - vim/commitdiff
patch 8.0.0804: running tests fails when stdin is /dev/null v8.0.0804
authorBram Moolenaar <Bram@vim.org>
Sat, 29 Jul 2017 18:16:03 +0000 (20:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 29 Jul 2017 18:16:03 +0000 (20:16 +0200)
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)

src/eval.c
src/evalfunc.c
src/version.c

index 4cb32893f10075fc99b1cc0eb261a563a4b8935f..c35def0b27465592d8944fd5c67860262c186ff6 100644 (file)
@@ -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
 
index 422b94e995cb5cc912ff6d5fc48f48bc8956fe61..7a2e4aad59873e45d6efa7e968fe07aa8b87d788 100644 (file)
@@ -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)
index 86e8cc6d682a663478c699212360a1c1b98f98f0..0648dd6ec758cf26522ea0f565bf52460147a35a 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    804,
 /**/
     803,
 /**/