Mercurial > vim
comparison src/testdir/test_edit.vim @ 24164:2259c73cc1d9 v8.2.2623
patch 8.2.2623: some tests fail when run as root
Commit: https://github.com/vim/vim/commit/17709e280ac5ba234b04641cde88d38e3522cedf
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 19 14:38:12 2021 +0100
patch 8.2.2623: some tests fail when run as root
Problem: Some tests fail when run as root.
Solution: Use CheckNotRoot.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 19 Mar 2021 14:45:04 +0100 |
parents | eeb5518a37aa |
children | ec71c859e94c |
comparison
equal
deleted
inserted
replaced
24163:c0d0b2f35264 | 24164:2259c73cc1d9 |
---|---|
1702 | 1702 |
1703 call delete('Xfile') | 1703 call delete('Xfile') |
1704 endfunc | 1704 endfunc |
1705 | 1705 |
1706 " Test for editing a file without read permission | 1706 " Test for editing a file without read permission |
1707 " NOTE: if you run tests as root this will fail. Don't run tests as root! | |
1708 func Test_edit_file_no_read_perm() | 1707 func Test_edit_file_no_read_perm() |
1709 CheckUnix | 1708 CheckUnix |
1709 CheckNotRoot | |
1710 | |
1710 call writefile(['one', 'two'], 'Xfile') | 1711 call writefile(['one', 'two'], 'Xfile') |
1711 call setfperm('Xfile', '-w-------') | 1712 call setfperm('Xfile', '-w-------') |
1712 new | 1713 new |
1713 redir => msg | 1714 redir => msg |
1714 edit Xfile | 1715 edit Xfile |