1
0
forked from aniani/vim

patch 8.2.1114: terminal test sometimes times out

Problem:    Terminal test sometimes times out.
Solution:   Split the test in two parts.
This commit is contained in:
Bram Moolenaar
2020-07-01 21:53:50 +02:00
parent a0d072ef82
commit 1112c0febb
6 changed files with 1581 additions and 1563 deletions

View File

@@ -276,6 +276,7 @@ NEW_TESTS = \
test_termcodes \ test_termcodes \
test_termencoding \ test_termencoding \
test_terminal \ test_terminal \
test_terminal2 \
test_terminal_fail \ test_terminal_fail \
test_textformat \ test_textformat \
test_textobjects \ test_textobjects \
@@ -492,6 +493,7 @@ NEW_TESTS_RES = \
test_termcodes.res \ test_termcodes.res \
test_termencoding.res \ test_termencoding.res \
test_terminal.res \ test_terminal.res \
test_terminal2.res \
test_terminal_fail.res \ test_terminal_fail.res \
test_textformat.res \ test_textformat.res \
test_textobjects.res \ test_textobjects.res \

View File

@@ -168,14 +168,6 @@ newtestssilent: $(NEW_TESTS_RES)
$(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL) $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
@rm vimcmd @rm vimcmd
# Temporary: Do not use $REDIR_TEST_TO_NULL for test_terminal to be able to see
# where it sometimes hanges on CI.
test_terminal.res: test_terminal.vim
@echo "$(VIMPROG)" > vimcmd
@echo "$(RUN_VIMTEST)" >> vimcmd
$(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim
@rm vimcmd
test_gui.res: test_gui.vim test_gui.res: test_gui.vim
@echo "$(VIMPROG)" > vimcmd @echo "$(VIMPROG)" > vimcmd
@echo "$(RUN_GVIMTEST)" >> vimcmd @echo "$(RUN_GVIMTEST)" >> vimcmd

View File

@@ -146,4 +146,28 @@ func StopVimInTerminal(buf)
only! only!
endfunc endfunc
" Open a terminal with a shell, assign the job to g:job and return the buffer
" number.
func Run_shell_in_terminal(options)
if has('win32')
let buf = term_start([&shell,'/k'], a:options)
else
let buf = term_start(&shell, a:options)
endif
let g:test_is_flaky = 1
let termlist = term_list()
call assert_equal(1, len(termlist))
call assert_equal(buf, termlist[0])
let g:job = term_getjob(buf)
call assert_equal(v:t_job, type(g:job))
let string = string({'job': buf->term_getjob()})
call assert_match("{'job': 'process \\d\\+ run'}", string)
return buf
endfunc
" vim: shiftwidth=2 sts=2 expandtab " vim: shiftwidth=2 sts=2 expandtab

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -754,6 +754,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 */
/**/
1114,
/**/ /**/
1113, 1113,
/**/ /**/