mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.1.0509: checking cwd not accessible fails for root
Problem: Checking cwd not accessible fails for root. (James McCoy) Solution: Skip this part of the test for root. (closes #3595)
This commit is contained in:
@@ -490,14 +490,17 @@ func Test_terminal_cwd_failure()
|
|||||||
call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
|
call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
|
||||||
|
|
||||||
" Case 3: Directory exists but is not accessible.
|
" Case 3: Directory exists but is not accessible.
|
||||||
call mkdir('Xdir', '', '0600')
|
" Skip this for root, it will be accessible anyway.
|
||||||
|
if $USER != 'root'
|
||||||
|
call mkdir('XdirNoAccess', '', '0600')
|
||||||
" return early if the directory permissions could not be set properly
|
" return early if the directory permissions could not be set properly
|
||||||
if getfperm('Xdir')[2] == 'x'
|
if getfperm('XdirNoAccess')[2] == 'x'
|
||||||
call delete('Xdir', 'rf')
|
call delete('XdirNoAccess', 'rf')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
|
call assert_fails("call term_start(&shell, {'cwd': 'XdirNoAccess'})", 'E475:')
|
||||||
call delete('Xdir', 'rf')
|
call delete('XdirNoAccess', 'rf')
|
||||||
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_terminal_servername()
|
func Test_terminal_servername()
|
||||||
|
@@ -792,6 +792,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
509,
|
||||||
/**/
|
/**/
|
||||||
508,
|
508,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user