From f49f3bf0c088e7dfaff708909ce7d00b6576b839 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 28 Oct 2015 13:35:16 +0200 Subject: [PATCH] sudo: Extend tests. --- highlighters/main/test-data/sudo-redirection.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/highlighters/main/test-data/sudo-redirection.zsh b/highlighters/main/test-data/sudo-redirection.zsh index e782996..e31ce6e 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 # ------------------------------------------------------------------------------------------------- -BUFFER='sudo -u >/tmp otheruser ls' +BUFFER='sudo -u >/tmp otheruser ls; sudo ls; sudo -i ls' expected_region_highlight=( "1 4 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo @@ -36,4 +36,11 @@ expected_region_highlight=( "10 13 $ZSH_HIGHLIGHT_STYLES[path]" # /tmp "15 23 $ZSH_HIGHLIGHT_STYLES[default]" # otheruser "25 26 $ZSH_HIGHLIGHT_STYLES[command]" # ls + "27 27 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ; + "29 32 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo + "34 35 $ZSH_HIGHLIGHT_STYLES[command]" # ls + "36 36 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ; + "38 41 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo + "43 44 $ZSH_HIGHLIGHT_STYLES[single-hyphen-option]" # -i + "46 47 $ZSH_HIGHLIGHT_STYLES[command]" # ls )