diff src/testdir/shared.vim @ 21343:d265b908c802 v8.2.1222

patch 8.2.1222: using valgrind in Vim command started by test doesn't work Commit: https://github.com/vim/vim/commit/657a826c07b4ea3f8846b6acb2c50b82c2d81e50 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 15 18:29:18 2020 +0200 patch 8.2.1222: using valgrind in Vim command started by test doesn't work 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 15 Jul 2020 18:30:04 +0200
parents 10eb6c38938c
children 20ccf5f7dc6d
line wrap: on
line diff
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -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