Mercurial > vim
comparison src/testdir/test_viminfo.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 | a5de1d88590d |
children | de2d1820215a |
comparison
equal
deleted
inserted
replaced
18276:79b045ead26e | 18277:f6dcf7eabd26 |
---|---|
734 endfunc | 734 endfunc |
735 | 735 |
736 " Test for an unwritable and unreadble 'viminfo' file | 736 " Test for an unwritable and unreadble 'viminfo' file |
737 func Test_viminfo_perm() | 737 func Test_viminfo_perm() |
738 CheckUnix | 738 CheckUnix |
739 CheckNotRoot | |
739 call writefile([''], 'Xviminfo') | 740 call writefile([''], 'Xviminfo') |
740 call setfperm('Xviminfo', 'r-x------') | 741 call setfperm('Xviminfo', 'r-x------') |
741 call assert_fails('wviminfo Xviminfo', 'E137:') | 742 call assert_fails('wviminfo Xviminfo', 'E137:') |
742 call setfperm('Xviminfo', '--x------') | 743 call setfperm('Xviminfo', '--x------') |
743 call assert_fails('rviminfo Xviminfo', 'E195:') | 744 call assert_fails('rviminfo Xviminfo', 'E195:') |