]> granicus.if.org Git - vim/commitdiff
patch 8.2.1222: using valgrind in Vim command started by test doesn't work v8.2.1222
authorBram Moolenaar <Bram@vim.org>
Wed, 15 Jul 2020 16:29:18 +0000 (18:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 15 Jul 2020 16:29:18 +0000 (18:29 +0200)
Problem:    When using valgrind a Vim command started by a test uses the same
            log file name which gets overwritten.
Solution:   Fix regexp to rename the log file.

src/testdir/shared.vim
src/version.c

index bbd28be1cc3e74e00b81f1ef242d05938274b058..c7dd41f20f5a6116131e20c5a43c876abc19b35b 100644 (file)
@@ -268,7 +268,7 @@ func GetVimCommand(...)
 
   " If using valgrind, make sure every run uses a different log file.
   if cmd =~ 'valgrind.*--log-file='
-    let cmd = substitute(cmd, '--log-file=\(^\s*\)', '--log-file=\1.' . g:valgrind_cnt, '')
+    let cmd = substitute(cmd, '--log-file=\(\S*\)', '--log-file=\1.' . g:valgrind_cnt, '')
     let g:valgrind_cnt += 1
   endif
 
index f0cfe69a31f419d156638cdcbaa31dfd055c5dcf..558a73e8487467401ec1e3cc2d21314a335b0df0 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1222,
 /**/
     1221,
 /**/