diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 21:52:44 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 21:52:44 +0800 |
| commit | 041b2d6f1ea4b683b6ac258abb24ed6bbe72208d (patch) | |
| tree | f5788bef0a2b65ba925f4a0f6ba41a07e61eb705 /src/nvim/testdir/check.vim | |
| parent | cb863d4e1f2c14eca46dda053a0d3062a0802196 (diff) | |
| download | rneovim-041b2d6f1ea4b683b6ac258abb24ed6bbe72208d.tar.gz rneovim-041b2d6f1ea4b683b6ac258abb24ed6bbe72208d.tar.bz2 rneovim-041b2d6f1ea4b683b6ac258abb24ed6bbe72208d.zip | |
vim-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 vim/vim#5020)
https://github.com/vim/vim/commit/07282f01da06c158bab4787adc89ec15d7eeb202
Skip test_terminal.vim and test_viminfo.vim: N/A
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() |