diff --git a/highlighters/main/test-data/prefix-redirection.zsh b/highlighters/main/test-data/prefix-redirection.zsh index 5a5c0e2..53c699f 100644 --- a/highlighters/main/test-data/prefix-redirection.zsh +++ b/highlighters/main/test-data/prefix-redirection.zsh @@ -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=( diff --git a/highlighters/main/test-data/sudo-command.zsh b/highlighters/main/test-data/sudo-command.zsh index 3183a23..e825e83 100644 --- a/highlighters/main/test-data/sudo-command.zsh +++ b/highlighters/main/test-data/sudo-command.zsh @@ -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) diff --git a/highlighters/main/test-data/sudo-comment.zsh b/highlighters/main/test-data/sudo-comment.zsh index 856567b..c750b01 100644 --- a/highlighters/main/test-data/sudo-comment.zsh +++ b/highlighters/main/test-data/sudo-comment.zsh @@ -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' diff --git a/highlighters/main/test-data/sudo-redirection.zsh b/highlighters/main/test-data/sudo-redirection.zsh index f507899..419caf2 100644 --- a/highlighters/main/test-data/sudo-redirection.zsh +++ b/highlighters/main/test-data/sudo-redirection.zsh @@ -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=( diff --git a/highlighters/main/test-data/sudo-redirection2.zsh b/highlighters/main/test-data/sudo-redirection2.zsh index 30f6ff8..715fed2 100644 --- a/highlighters/main/test-data/sudo-redirection2.zsh +++ b/highlighters/main/test-data/sudo-redirection2.zsh @@ -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=( diff --git a/highlighters/main/test-data/sudo-redirection3.zsh b/highlighters/main/test-data/sudo-redirection3.zsh index fdd426d..f8ea581 100644 --- a/highlighters/main/test-data/sudo-redirection3.zsh +++ b/highlighters/main/test-data/sudo-redirection3.zsh @@ -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=(