]> granicus.if.org Git - vim/commitdiff
patch 8.0.1082: tests fail when run under valgrind v8.0.1082
authorBram Moolenaar <Bram@vim.org>
Sat, 9 Sep 2017 16:11:00 +0000 (18:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 9 Sep 2017 16:11:00 +0000 (18:11 +0200)
Problem:    Tests fail when run under valgrind.
Solution:   Increase waiting times.

src/testdir/test_clientserver.vim
src/testdir/test_terminal.vim
src/version.c

index 0f403711d9b49bf2f8176f7e6863a858121f7552..811af138cd33c2f8b3158cf9e9f4c71fb1b9bbc8 100644 (file)
@@ -35,7 +35,8 @@ func Test_client_server()
   endif
 
   " 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 remote_foreground(name)
index efc491d92bccfe28d0667a1aee839e901c63cc3f..004c2c37fea5d162b92eac98a2cff4f1eb417603 100644 (file)
@@ -104,6 +104,15 @@ func! s:Nasty_exit_cb(job, st)
   let g:buf = 0
 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()
   let cmd = Get_cat_123_cmd()
   let g:buf = term_start(cmd, {'exit_cb': function('s:Nasty_exit_cb')})
@@ -143,15 +152,6 @@ func Check_123(buf)
   call assert_equal('123', l)
 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()
   let cmd = Get_cat_123_cmd()
   let buf = term_start(cmd)
@@ -393,7 +393,6 @@ func Test_finish_open_close()
   call assert_equal(2, winnr('$'))
   call assert_equal(4, winheight(0))
   bwipe
-
 endfunc
 
 func Test_terminal_cwd()
@@ -613,6 +612,7 @@ func Test_terminal_redir_file()
     call term_wait(buf)
     call WaitFor('len(readfile("Xfile")) > 0')
     call assert_match('executing job failed', readfile('Xfile')[0])
+    call WaitFor('!&modified')
     call delete('Xfile')
     bwipe
 
index 0018bce75815d5f6422da5b8666903c34e11bb46..f2fde0055a1f929d59d37877e227a6342ef8aaad 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1082,
 /**/
     1081,
 /**/