0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1187: terminal2 test sometimes hangs in the GUI on Travis

Problem:    Terminal2 test sometimes hangs in the GUI on Travis.
Solution:   Disable Test_zz2_terminal_guioptions_bang() for now.
This commit is contained in:
Bram Moolenaar
2020-07-12 14:09:23 +02:00
parent 13c046316b
commit c85156bb89
2 changed files with 37 additions and 29 deletions

View File

@@ -256,35 +256,36 @@ func Test_zz1_terminal_in_gui()
unlet g:job unlet g:job
endfunc endfunc
func Test_zz2_terminal_guioptions_bang() " TODO: reenable when this no longer hangs on Travis
CheckGui "func Test_zz2_terminal_guioptions_bang()
set guioptions+=! " CheckGui
" set guioptions+=!
let filename = 'Xtestscript' "
if has('win32') " let filename = 'Xtestscript'
let filename .= '.bat' " if has('win32')
let prefix = '' " let filename .= '.bat'
let contents = ['@echo off', 'exit %1'] " let prefix = ''
else " let contents = ['@echo off', 'exit %1']
let filename .= '.sh' " else
let prefix = './' " let filename .= '.sh'
let contents = ['#!/bin/sh', 'exit $1'] " let prefix = './'
endif " let contents = ['#!/bin/sh', 'exit $1']
call writefile(contents, filename) " endif
call setfperm(filename, 'rwxrwx---') " call writefile(contents, filename)
" call setfperm(filename, 'rwxrwx---')
" Check if v:shell_error is equal to the exit status. "
let exitval = 0 " " Check if v:shell_error is equal to the exit status.
execute printf(':!%s%s %d', prefix, filename, exitval) " let exitval = 0
call assert_equal(exitval, v:shell_error) " execute printf(':!%s%s %d', prefix, filename, exitval)
" call assert_equal(exitval, v:shell_error)
let exitval = 9 "
execute printf(':!%s%s %d', prefix, filename, exitval) " let exitval = 9
call assert_equal(exitval, v:shell_error) " execute printf(':!%s%s %d', prefix, filename, exitval)
" call assert_equal(exitval, v:shell_error)
set guioptions& "
call delete(filename) " set guioptions&
endfunc " call delete(filename)
"endfunc
func Test_terminal_hidden() func Test_terminal_hidden()
CheckUnix CheckUnix
@@ -305,6 +306,11 @@ func Test_terminal_switch_mode()
term term
let bnr = bufnr('$') let bnr = bufnr('$')
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))}) call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
" In the GUI the first switch sometimes doesn't work. Switch twice to avoid
" flakyness.
call feedkeys("\<C-W>N", 'xt')
call feedkeys("A", 'xt')
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
call feedkeys("\<C-W>N", 'xt') call feedkeys("\<C-W>N", 'xt')
call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))}) call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
call feedkeys("A", 'xt') call feedkeys("A", 'xt')

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 */
/**/
1187,
/**/ /**/
1186, 1186,
/**/ /**/