mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00
vim-patch:8.0.1793: no test for "vim -g"
Problem: No test for "vim -g".
Solution: Add a test for "-g" and "-y".
248be5c5de
This commit is contained in:
@@ -252,6 +252,8 @@ func GetVimProg()
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
let g:valgrind_cnt = 1
|
||||||
|
|
||||||
" Get the command to run Vim, with -u NONE and --headless arguments.
|
" Get the command to run Vim, with -u NONE and --headless arguments.
|
||||||
" If there is an argument use it instead of "NONE".
|
" If there is an argument use it instead of "NONE".
|
||||||
func GetVimCommand(...)
|
func GetVimCommand(...)
|
||||||
@@ -267,6 +269,13 @@ func GetVimCommand(...)
|
|||||||
endif
|
endif
|
||||||
let cmd .= ' --headless -i NONE'
|
let cmd .= ' --headless -i NONE'
|
||||||
let cmd = substitute(cmd, 'VIMRUNTIME=.*VIMRUNTIME;', '', '')
|
let cmd = substitute(cmd, 'VIMRUNTIME=.*VIMRUNTIME;', '', '')
|
||||||
|
|
||||||
|
" 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 g:valgrind_cnt += 1
|
||||||
|
endif
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -290,9 +299,6 @@ endfunc
|
|||||||
func RunVimPiped(before, after, arguments, pipecmd)
|
func RunVimPiped(before, after, arguments, pipecmd)
|
||||||
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
||||||
let cmd = GetVimCommand()
|
let cmd = GetVimCommand()
|
||||||
if cmd == ''
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
let args = ''
|
let args = ''
|
||||||
if len(a:before) > 0
|
if len(a:before) > 0
|
||||||
call writefile(a:before, 'Xbefore.vim')
|
call writefile(a:before, 'Xbefore.vim')
|
||||||
|
Reference in New Issue
Block a user