Mercurial > vim
diff src/testdir/test_terminal.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 | 4ac8161e92e0 |
children | 2ffe3309958c |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -570,7 +570,7 @@ func Test_terminal_cwd_failure() " Case 3: Directory exists but is not accessible. " Skip this for root, it will be accessible anyway. - if $USER != 'root' + if !IsRoot() call mkdir('XdirNoAccess', '', '0600') " return early if the directory permissions could not be set properly if getfperm('XdirNoAccess')[2] == 'x' @@ -1353,7 +1353,6 @@ endfunc func Test_terminal_api_call() CheckRunVimInTerminal -call ch_logfile('logfile', 'w') unlet! g:called_bufnum unlet! g:called_arg