]> granicus.if.org Git - vim/commitdiff
patch 8.2.5130: edit test for mode message fails when using valgrind v8.2.5130
authorBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2022 14:22:36 +0000 (15:22 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2022 14:22:36 +0000 (15:22 +0100)
Problem:    Edit test for mode message fails when using valgrind.
Solution:   Use WaitForAssert().  Run beep test later.

src/testdir/test_edit.vim
src/version.c

index d56ee622ead5161b23514500f6a8797a62777f84..4c5c957beba95ec7d9d7a876e4214b1c77c0fc0b 100644 (file)
@@ -1860,11 +1860,9 @@ func Test_edit_insertmode_ex_edit()
   call writefile(lines, 'Xtest_edit_insertmode_ex_edit')
 
   let buf = RunVimInTerminal('-S Xtest_edit_insertmode_ex_edit', #{rows: 6})
-  call TermWait(buf, 50)
-  call assert_match('^-- INSERT --\s*$', term_getline(buf, 6))
+  call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, 6))})
   call term_sendkeys(buf, "\<C-B>\<C-L>")
-  call TermWait(buf, 50)
-  call assert_notmatch('^-- INSERT --\s*$', term_getline(buf, 6))
+  call WaitForAssert({-> assert_notmatch('^-- INSERT --\s*$', term_getline(buf, 6))})
 
   " clean up
   call StopVimInTerminal(buf)
@@ -1872,14 +1870,16 @@ func Test_edit_insertmode_ex_edit()
 endfunc
 
 " Pressing escape in 'insertmode' should beep
-func Test_edit_insertmode_esc_beeps()
+" FIXME: Execute this later, when using valgrind it makes the next test
+" Test_edit_insertmode_ex_edit() fail.
+func Test_z_edit_insertmode_esc_beeps()
   new
   set insertmode
   call assert_beeps("call feedkeys(\"one\<Esc>\", 'xt')")
   set insertmode&
-  " unsupported CTRL-G command should beep in insert mode.
+  " unsupported "CTRL-G l" command should beep in insert mode.
   call assert_beeps("normal i\<C-G>l")
-  close!
+  bwipe!
 endfunc
 
 " Test for 'hkmap' and 'hkmapp'
index d038087541807c4184c5e8c6208b521d5ed16ff9..60c1817ddea9eaf98e22b6c79a58da4ced79b5d7 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5130,
 /**/
     5129,
 /**/