diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-11-03 21:47:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-11-03 21:47:16 +0100 |
commit | 0b38f54730c3f9835ddade01c2263ce0f56c1c0f (patch) | |
tree | 3b695b06846f0bf894670bbe6bf5e8de9b40f989 /src | |
parent | 0f62cf5b335968f7448af1a6f46e0104b7bc365e (diff) | |
download | vim-git-0b38f54730c3f9835ddade01c2263ce0f56c1c0f.tar.gz |
patch 8.1.0509: checking cwd not accessible fails for rootv8.1.0509
Problem: Checking cwd not accessible fails for root. (James McCoy)
Solution: Skip this part of the test for root. (closes #3595)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_terminal.vim | 17 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 235cd3160..88cb89e9b 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -490,14 +490,17 @@ func Test_terminal_cwd_failure() call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:') " Case 3: Directory exists but is not accessible. - call mkdir('Xdir', '', '0600') - " return early if the directory permissions could not be set properly - if getfperm('Xdir')[2] == 'x' - call delete('Xdir', 'rf') - return + " 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 + if getfperm('XdirNoAccess')[2] == 'x' + call delete('XdirNoAccess', 'rf') + return + endif + call assert_fails("call term_start(&shell, {'cwd': 'XdirNoAccess'})", 'E475:') + call delete('XdirNoAccess', 'rf') endif - call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:') - call delete('Xdir', 'rf') endfunc func Test_terminal_servername() diff --git a/src/version.c b/src/version.c index 1e66b3ed7..fb8a16dc2 100644 --- a/src/version.c +++ b/src/version.c @@ -793,6 +793,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 509, +/**/ 508, /**/ 507, |