Skip to content

Commit

Permalink
patch 8.0.1082: tests fail when run under valgrind
Browse files Browse the repository at this point in the history
Problem:    Tests fail when run under valgrind.
Solution:   Increase waiting times.
  • Loading branch information
brammool committed Sep 9, 2017
1 parent aba680a commit 9d18961
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/testdir/test_clientserver.vim
Expand Up @@ -35,7 +35,8 @@ func Test_client_server()
endif endif


" Takes a short while for the server to be active. " Takes a short while for the server to be active.
call WaitFor('serverlist() =~ "' . name . '"') " When using valgrind it takes much longer.
call WaitFor('serverlist() =~ "' . name . '"', 5000)
call assert_match(name, serverlist()) call assert_match(name, serverlist())


call remote_foreground(name) call remote_foreground(name)
Expand Down
20 changes: 10 additions & 10 deletions src/testdir/test_terminal.vim
Expand Up @@ -104,6 +104,15 @@ func! s:Nasty_exit_cb(job, st)
let g:buf = 0 let g:buf = 0
endfunc endfunc


func Get_cat_123_cmd()
if has('win32')
return 'cmd /c "cls && color 2 && echo 123"'
else
call writefile(["\<Esc>[32m123"], 'Xtext')
return "cat Xtext"
endif
endfunc

func Test_terminal_nasty_cb() func Test_terminal_nasty_cb()
let cmd = Get_cat_123_cmd() let cmd = Get_cat_123_cmd()
let g:buf = term_start(cmd, {'exit_cb': function('s:Nasty_exit_cb')}) let g:buf = term_start(cmd, {'exit_cb': function('s:Nasty_exit_cb')})
Expand Down Expand Up @@ -143,15 +152,6 @@ func Check_123(buf)
call assert_equal('123', l) call assert_equal('123', l)
endfunc endfunc


func Get_cat_123_cmd()
if has('win32')
return 'cmd /c "cls && color 2 && echo 123"'
else
call writefile(["\<Esc>[32m123"], 'Xtext')
return "cat Xtext"
endif
endfunc

func Test_terminal_scrape_123() func Test_terminal_scrape_123()
let cmd = Get_cat_123_cmd() let cmd = Get_cat_123_cmd()
let buf = term_start(cmd) let buf = term_start(cmd)
Expand Down Expand Up @@ -393,7 +393,6 @@ func Test_finish_open_close()
call assert_equal(2, winnr('$')) call assert_equal(2, winnr('$'))
call assert_equal(4, winheight(0)) call assert_equal(4, winheight(0))
bwipe bwipe

endfunc endfunc


func Test_terminal_cwd() func Test_terminal_cwd()
Expand Down Expand Up @@ -613,6 +612,7 @@ func Test_terminal_redir_file()
call term_wait(buf) call term_wait(buf)
call WaitFor('len(readfile("Xfile")) > 0') call WaitFor('len(readfile("Xfile")) > 0')
call assert_match('executing job failed', readfile('Xfile')[0]) call assert_match('executing job failed', readfile('Xfile')[0])
call WaitFor('!&modified')
call delete('Xfile') call delete('Xfile')
bwipe bwipe


Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -769,6 +769,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 */
/**/
1082,
/**/ /**/
1081, 1081,
/**/ /**/
Expand Down

0 comments on commit 9d18961

Please sign in to comment.