Mercurial > vim
changeset 11848:f5968ca369b5 v8.0.0804
patch 8.0.0804: running tests fails when stdin is /dev/null
commit https://github.com/vim/vim/commit/91d348abfc0d7ac9b5b19cde0112de8ae4335602
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 29 20:16:03 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 29 Jul 2017 20:30:05 +0200 |
parents | 2b275a983fc1 |
children | 9299c7eeddde |
files | src/eval.c src/evalfunc.c src/version.c |
diffstat | 3 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -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
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -6482,8 +6482,9 @@ f_inputlist(typval_T *argvars, typval_T 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)