Mercurial > vim
comparison src/testdir/test_terminal.vim @ 14995:bc0f3c4fb992 v8.1.0509
patch 8.1.0509: checking cwd not accessible fails for root
commit https://github.com/vim/vim/commit/0b38f54730c3f9835ddade01c2263ce0f56c1c0f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 3 21:47:16 2018 +0100
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 https://github.com/vim/vim/issues/3595)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 03 Nov 2018 22:00:06 +0100 |
parents | cb07193c6257 |
children | f3b4cd98944c |
comparison
equal
deleted
inserted
replaced
14994:2abb8dc8b4d2 | 14995:bc0f3c4fb992 |
---|---|
488 | 488 |
489 " Case 2: Directory does not exist. | 489 " Case 2: Directory does not exist. |
490 call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:') | 490 call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:') |
491 | 491 |
492 " Case 3: Directory exists but is not accessible. | 492 " Case 3: Directory exists but is not accessible. |
493 call mkdir('Xdir', '', '0600') | 493 " Skip this for root, it will be accessible anyway. |
494 " return early if the directory permissions could not be set properly | 494 if $USER != 'root' |
495 if getfperm('Xdir')[2] == 'x' | 495 call mkdir('XdirNoAccess', '', '0600') |
496 call delete('Xdir', 'rf') | 496 " return early if the directory permissions could not be set properly |
497 return | 497 if getfperm('XdirNoAccess')[2] == 'x' |
498 endif | 498 call delete('XdirNoAccess', 'rf') |
499 call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:') | 499 return |
500 call delete('Xdir', 'rf') | 500 endif |
501 call assert_fails("call term_start(&shell, {'cwd': 'XdirNoAccess'})", 'E475:') | |
502 call delete('XdirNoAccess', 'rf') | |
503 endif | |
501 endfunc | 504 endfunc |
502 | 505 |
503 func Test_terminal_servername() | 506 func Test_terminal_servername() |
504 if !has('clientserver') | 507 if !has('clientserver') |
505 return | 508 return |