mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 18:11:47 +00:00
vim-patch:8.1.2133: some tests fail when run as root
Problem: Some tests fail when run as root.
Solution: Add CheckNotRoot and use it. (James McCoy, closes vim/vim#5020)
07282f01da
Skip test_terminal.vim and test_viminfo.vim: N/A
This commit is contained in:
@@ -343,6 +343,15 @@ func RunVimPiped(before, after, arguments, pipecmd)
|
||||
return 1
|
||||
endfunc
|
||||
|
||||
func IsRoot()
|
||||
if !has('unix')
|
||||
return v:false
|
||||
elseif $USER == 'root' || system('id -un') =~ '\<root\>'
|
||||
return v:true
|
||||
endif
|
||||
return v:false
|
||||
endfunc
|
||||
|
||||
" Get all messages but drop the maintainer entry.
|
||||
func GetMessages()
|
||||
redir => result
|
||||
|
||||
Reference in New Issue
Block a user