mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.4157: terminal test fails because Windows sets the title
Problem: Terminal test fails because Windows sets the title. Solution: Add the "vterm_title" testing override and use it in the test. (Ozaki Kiichi, closes #9556)
This commit is contained in:
parent
726f7f91fd
commit
ae1bd87fe8
@ -208,6 +208,8 @@ test_override({name}, {val}) *test_override()*
|
|||||||
ui_delay time in msec to use in ui_delay(); overrules a
|
ui_delay time in msec to use in ui_delay(); overrules a
|
||||||
wait time of up to 3 seconds for messages
|
wait time of up to 3 seconds for messages
|
||||||
uptime overrules sysinfo.uptime
|
uptime overrules sysinfo.uptime
|
||||||
|
vterm_title setting the window title by a job running in a
|
||||||
|
terminal window
|
||||||
ALL clear all overrides ({val} is not used)
|
ALL clear all overrides ({val} is not used)
|
||||||
|
|
||||||
"starting" is to be used when a test should behave like
|
"starting" is to be used when a test should behave like
|
||||||
|
@ -1642,6 +1642,7 @@ EXTERN int nfa_fail_for_testing INIT(= FALSE);
|
|||||||
EXTERN int no_query_mouse_for_testing INIT(= FALSE);
|
EXTERN int no_query_mouse_for_testing INIT(= FALSE);
|
||||||
EXTERN int ui_delay_for_testing INIT(= 0);
|
EXTERN int ui_delay_for_testing INIT(= 0);
|
||||||
EXTERN int reset_term_props_on_termresponse INIT(= FALSE);
|
EXTERN int reset_term_props_on_termresponse INIT(= FALSE);
|
||||||
|
EXTERN int disable_vterm_title_for_testing INIT(= FALSE);
|
||||||
EXTERN long override_sysinfo_uptime INIT(= -1);
|
EXTERN long override_sysinfo_uptime INIT(= -1);
|
||||||
EXTERN int override_autoload INIT(= FALSE);
|
EXTERN int override_autoload INIT(= FALSE);
|
||||||
|
|
||||||
|
@ -3088,6 +3088,8 @@ handle_settermprop(
|
|||||||
switch (prop)
|
switch (prop)
|
||||||
{
|
{
|
||||||
case VTERM_PROP_TITLE:
|
case VTERM_PROP_TITLE:
|
||||||
|
if (disable_vterm_title_for_testing)
|
||||||
|
break;
|
||||||
strval = vim_strnsave((char_u *)value->string.str,
|
strval = vim_strnsave((char_u *)value->string.str,
|
||||||
value->string.len);
|
value->string.len);
|
||||||
if (strval == NULL)
|
if (strval == NULL)
|
||||||
|
@ -14,6 +14,7 @@ let s:python = PythonProg()
|
|||||||
let $PROMPT_COMMAND=''
|
let $PROMPT_COMMAND=''
|
||||||
|
|
||||||
func Test_terminal_basic()
|
func Test_terminal_basic()
|
||||||
|
call test_override('vterm_title', 1)
|
||||||
au TerminalOpen * let b:done = 'yes'
|
au TerminalOpen * let b:done = 'yes'
|
||||||
let buf = Run_shell_in_terminal({})
|
let buf = Run_shell_in_terminal({})
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ func Test_terminal_basic()
|
|||||||
call assert_equal("", bufname(buf))
|
call assert_equal("", bufname(buf))
|
||||||
|
|
||||||
au! TerminalOpen
|
au! TerminalOpen
|
||||||
|
call test_override('ALL', 0)
|
||||||
unlet g:job
|
unlet g:job
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@ -1053,6 +1053,8 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
ui_delay_for_testing = val;
|
ui_delay_for_testing = val;
|
||||||
else if (STRCMP(name, (char_u *)"term_props") == 0)
|
else if (STRCMP(name, (char_u *)"term_props") == 0)
|
||||||
reset_term_props_on_termresponse = val;
|
reset_term_props_on_termresponse = val;
|
||||||
|
else if (STRCMP(name, (char_u *)"vterm_title") == 0)
|
||||||
|
disable_vterm_title_for_testing = val;
|
||||||
else if (STRCMP(name, (char_u *)"uptime") == 0)
|
else if (STRCMP(name, (char_u *)"uptime") == 0)
|
||||||
override_sysinfo_uptime = val;
|
override_sysinfo_uptime = val;
|
||||||
else if (STRCMP(name, (char_u *)"autoload") == 0)
|
else if (STRCMP(name, (char_u *)"autoload") == 0)
|
||||||
|
@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
4157,
|
||||||
/**/
|
/**/
|
||||||
4156,
|
4156,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user