Skip to content

Commit 9d18961

Browse files
committed
patch 8.0.1082: tests fail when run under valgrind
Problem: Tests fail when run under valgrind. Solution: Increase waiting times.
1 parent aba680a commit 9d18961

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/testdir/test_clientserver.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ func Test_client_server()
3535
endif
3636

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

4142
call remote_foreground(name)

src/testdir/test_terminal.vim

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ func! s:Nasty_exit_cb(job, st)
104104
let g:buf = 0
105105
endfunc
106106

107+
func Get_cat_123_cmd()
108+
if has('win32')
109+
return 'cmd /c "cls && color 2 && echo 123"'
110+
else
111+
call writefile(["\<Esc>[32m123"], 'Xtext')
112+
return "cat Xtext"
113+
endif
114+
endfunc
115+
107116
func Test_terminal_nasty_cb()
108117
let cmd = Get_cat_123_cmd()
109118
let g:buf = term_start(cmd, {'exit_cb': function('s:Nasty_exit_cb')})
@@ -143,15 +152,6 @@ func Check_123(buf)
143152
call assert_equal('123', l)
144153
endfunc
145154

146-
func Get_cat_123_cmd()
147-
if has('win32')
148-
return 'cmd /c "cls && color 2 && echo 123"'
149-
else
150-
call writefile(["\<Esc>[32m123"], 'Xtext')
151-
return "cat Xtext"
152-
endif
153-
endfunc
154-
155155
func Test_terminal_scrape_123()
156156
let cmd = Get_cat_123_cmd()
157157
let buf = term_start(cmd)
@@ -393,7 +393,6 @@ func Test_finish_open_close()
393393
call assert_equal(2, winnr('$'))
394394
call assert_equal(4, winheight(0))
395395
bwipe
396-
397396
endfunc
398397

399398
func Test_terminal_cwd()
@@ -613,6 +612,7 @@ func Test_terminal_redir_file()
613612
call term_wait(buf)
614613
call WaitFor('len(readfile("Xfile")) > 0')
615614
call assert_match('executing job failed', readfile('Xfile')[0])
615+
call WaitFor('!&modified')
616616
call delete('Xfile')
617617
bwipe
618618

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
1082,
772774
/**/
773775
1081,
774776
/**/

0 commit comments

Comments
 (0)