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 #5020)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 0041965..7e8ef76 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -570,7 +570,7 @@
" 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 @@
func Test_terminal_api_call()
CheckRunVimInTerminal
-call ch_logfile('logfile', 'w')
unlet! g:called_bufnum
unlet! g:called_arg