Browse Source

tests: Add skips for tests that require sudo

pull/381/merge
Matthew Martin 6 years ago
parent
commit
d04c62a224
6 changed files with 12 additions and 0 deletions
  1. +2
    -0
      highlighters/main/test-data/prefix-redirection.zsh
  2. +2
    -0
      highlighters/main/test-data/sudo-command.zsh
  3. +2
    -0
      highlighters/main/test-data/sudo-comment.zsh
  4. +2
    -0
      highlighters/main/test-data/sudo-redirection.zsh
  5. +2
    -0
      highlighters/main/test-data/sudo-redirection2.zsh
  6. +2
    -0
      highlighters/main/test-data/sudo-redirection3.zsh

+ 2
- 0
highlighters/main/test-data/prefix-redirection.zsh View File

@ -27,6 +27,8 @@
# 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'
expected_region_highlight=(

+ 2
- 0
highlighters/main/test-data/sudo-command.zsh View File

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

+ 2
- 0
highlighters/main/test-data/sudo-comment.zsh View File

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

+ 2
- 0
highlighters/main/test-data/sudo-redirection.zsh View File

@ -27,6 +27,8 @@
# 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'
expected_region_highlight=(

+ 2
- 0
highlighters/main/test-data/sudo-redirection2.zsh View File

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

+ 2
- 0
highlighters/main/test-data/sudo-redirection3.zsh View File

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

Loading…
Cancel
Save