tests: Add skips for tests that require sudo

This commit is contained in:
Matthew Martin 2017-12-06 18:34:56 -06:00
parent 26a82113b0
commit d04c62a224
6 changed files with 12 additions and 0 deletions

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
BUFFER='>/tmp >/tmp sudo echo >/tmp foo' BUFFER='>/tmp >/tmp sudo echo >/tmp foo'
expected_region_highlight=( expected_region_highlight=(

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
# Tests three codepaths: # Tests three codepaths:
# * -i (no argument) # * -i (no argument)
# * -C3 (pasted argument) # * -C3 (pasted argument)

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
setopt interactive_comments setopt interactive_comments
BUFFER='sudo -u # comment' BUFFER='sudo -u # comment'

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
BUFFER='sudo -u >/tmp otheruser ls; sudo ls; sudo -i ls' BUFFER='sudo -u >/tmp otheruser ls; sudo ls; sudo -i ls'
expected_region_highlight=( expected_region_highlight=(

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
BUFFER='sudo >/tmp -u otheruser ls' BUFFER='sudo >/tmp -u otheruser ls'
expected_region_highlight=( expected_region_highlight=(

View File

@ -27,6 +27,8 @@
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
type sudo >/dev/null || skip_test='sudo must be present'
BUFFER='sudo 2>./. -u otheruser ls' BUFFER='sudo 2>./. -u otheruser ls'
expected_region_highlight=( expected_region_highlight=(