comparison src/testdir/shared.vim @ 18277:f6dcf7eabd26 v8.1.2133

patch 8.1.2133: some tests fail when run as root Commit: https://github.com/vim/vim/commit/07282f01da06c158bab4787adc89ec15d7eeb202 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 10 16:46:17 2019 +0200 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 https://github.com/vim/vim/issues/5020)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Oct 2019 17:00:03 +0200
parents 233e316c0b5a
children eff8d8f72a82
comparison
equal deleted inserted replaced
18276:79b045ead26e 18277:f6dcf7eabd26
323 if len(a:after) > 0 323 if len(a:after) > 0
324 call delete('Xafter.vim') 324 call delete('Xafter.vim')
325 endif 325 endif
326 return 1 326 return 1
327 endfunc 327 endfunc
328
329 func IsRoot()
330 if !has('unix')
331 return v:false
332 elseif $USER == 'root' || system('id -un') =~ '\<root\>'
333 return v:true
334 endif
335 return v:false
336 endfunc