From 1ad5c1f40fc66fd41402d55da134a8ea8313e654 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 7 Dec 2017 01:16:02 +0000 Subject: [PATCH] Followup to parents: Restore sudo-* tests on platforms that don't have sudo. Travis (as currently configured) is one such platform. --- highlighters/main/test-data/sudo-command.zsh | 2 +- highlighters/main/test-data/sudo-comment.zsh | 2 +- highlighters/main/test-data/sudo-redirection.zsh | 2 +- highlighters/main/test-data/sudo-redirection2.zsh | 2 +- highlighters/main/test-data/sudo-redirection3.zsh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/highlighters/main/test-data/sudo-command.zsh b/highlighters/main/test-data/sudo-command.zsh index e825e83..266ace2 100644 --- a/highlighters/main/test-data/sudo-command.zsh +++ b/highlighters/main/test-data/sudo-command.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -type sudo >/dev/null || skip_test='sudo must be present' +sudo(){} # Tests three codepaths: # * -i (no argument) diff --git a/highlighters/main/test-data/sudo-comment.zsh b/highlighters/main/test-data/sudo-comment.zsh index c750b01..74cd905 100644 --- a/highlighters/main/test-data/sudo-comment.zsh +++ b/highlighters/main/test-data/sudo-comment.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -type sudo >/dev/null || skip_test='sudo must be present' +sudo(){} 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 419caf2..c675d7d 100644 --- a/highlighters/main/test-data/sudo-redirection.zsh +++ b/highlighters/main/test-data/sudo-redirection.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -type sudo >/dev/null || skip_test='sudo must be present' +sudo(){} BUFFER='sudo -u >/tmp otheruser ls; sudo ls; sudo -i ls' diff --git a/highlighters/main/test-data/sudo-redirection2.zsh b/highlighters/main/test-data/sudo-redirection2.zsh index 715fed2..23ada53 100644 --- a/highlighters/main/test-data/sudo-redirection2.zsh +++ b/highlighters/main/test-data/sudo-redirection2.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -type sudo >/dev/null || skip_test='sudo must be present' +sudo(){} BUFFER='sudo >/tmp -u otheruser ls' diff --git a/highlighters/main/test-data/sudo-redirection3.zsh b/highlighters/main/test-data/sudo-redirection3.zsh index f8ea581..80e55b5 100644 --- a/highlighters/main/test-data/sudo-redirection3.zsh +++ b/highlighters/main/test-data/sudo-redirection3.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -type sudo >/dev/null || skip_test='sudo must be present' +sudo(){} BUFFER='sudo 2>./. -u otheruser ls'