Patch 8.2.4157
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)
Files: runtime/doc/testing.txt, src/globals.h, src/terminal.c,
src/testing.c, src/testdir/test_terminal.vim
*** ../vim-8.2.4156/runtime/doc/testing.txt 2022-01-13 22:05:05.567104513
+0000
--- runtime/doc/testing.txt 2022-01-20 14:56:24.093576213 +0000
***************
*** 210,215 ****
--- 208,215 ----
ui_delay time in msec to use in ui_delay(); overrules a
wait time of up to 3 seconds for messages
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)
"starting" is to be used when a test should behave like
*** ../vim-8.2.4156/src/globals.h 2022-01-13 22:05:05.567104513 +0000
--- src/globals.h 2022-01-20 14:49:18.885720568 +0000
***************
*** 1642,1647 ****
--- 1642,1648 ----
EXTERN int no_query_mouse_for_testing INIT(= FALSE);
EXTERN int ui_delay_for_testing INIT(= 0);
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 int override_autoload INIT(= FALSE);
*** ../vim-8.2.4156/src/terminal.c 2022-01-15 18:25:04.661419379 +0000
--- src/terminal.c 2022-01-20 14:49:18.885720568 +0000
***************
*** 3088,3093 ****
--- 3088,3095 ----
switch (prop)
{
case VTERM_PROP_TITLE:
+ if (disable_vterm_title_for_testing)
+ break;
strval = vim_strnsave((char_u *)value->string.str,
value->string.len);
if (strval == NULL)
*** ../vim-8.2.4156/src/testing.c 2022-01-13 22:05:05.567104513 +0000
--- src/testing.c 2022-01-20 14:49:18.885720568 +0000
***************
*** 1053,1058 ****
--- 1053,1060 ----
ui_delay_for_testing = val;
else if (STRCMP(name, (char_u *)"term_props") == 0)
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)
override_sysinfo_uptime = val;
else if (STRCMP(name, (char_u *)"autoload") == 0)
*** ../vim-8.2.4156/src/testdir/test_terminal.vim 2022-01-13
15:25:28.222535371 +0000
--- src/testdir/test_terminal.vim 2022-01-20 14:49:18.885720568 +0000
***************
*** 14,19 ****
--- 14,20 ----
let $PROMPT_COMMAND=''
func Test_terminal_basic()
+ call test_override('vterm_title', 1)
au TerminalOpen * let b:done = 'yes'
let buf = Run_shell_in_terminal({})
***************
*** 37,42 ****
--- 38,44 ----
call assert_equal("", bufname(buf))
au! TerminalOpen
+ call test_override('ALL', 0)
unlet g:job
endfunc
*** ../vim-8.2.4156/src/version.c 2022-01-20 14:43:55.719748948 +0000
--- src/version.c 2022-01-20 14:56:52.941018512 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4157,
/**/
--
Two cows are standing together in a field. One asks the other:
"So what do you think about this Mad Cow Disease?"
The other replies: "That doesn't concern me. I'm a helicopter."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220120145803.2ED261C188D%40moolenaar.net.