diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 22:24:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-04 22:24:38 +0800 |
| commit | c50cea3de4480014a6108285eb2d530886cc8303 (patch) | |
| tree | f5788bef0a2b65ba925f4a0f6ba41a07e61eb705 /src/nvim/testdir/check.vim | |
| parent | cb863d4e1f2c14eca46dda053a0d3062a0802196 (diff) | |
| parent | 041b2d6f1ea4b683b6ac258abb24ed6bbe72208d (diff) | |
| download | rneovim-c50cea3de4480014a6108285eb2d530886cc8303.tar.gz rneovim-c50cea3de4480014a6108285eb2d530886cc8303.tar.bz2 rneovim-c50cea3de4480014a6108285eb2d530886cc8303.zip | |
Merge pull request #17287 from zeertzjq/vim-8.1.2133
vim-patch:8.1.2133: some tests fail when run as root
Diffstat (limited to 'src/nvim/testdir/check.vim')
| -rw-r--r-- | src/nvim/testdir/check.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 76c0f7d422..883f036fe1 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -113,6 +113,14 @@ func CheckNotGui() endif endfunc +" Command to check that test is not running as root +command CheckNotRoot call CheckNotRoot() +func CheckNotRoot() + if IsRoot() + throw 'Skipped: cannot run test as root' + endif +endfunc + " Command to check that the current language is English command CheckEnglish call CheckEnglish() func CheckEnglish() |