diff --git a/highlighters/main/test-data/sudo-command.zsh b/highlighters/main/test-data/sudo-command.zsh index 6e84179..437d5eb 100644 --- a/highlighters/main/test-data/sudo-command.zsh +++ b/highlighters/main/test-data/sudo-command.zsh @@ -28,12 +28,18 @@ # ------------------------------------------------------------------------------------------------- ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=$unused_highlight -BUFFER='sudo -u otheruser ls /' +# Tests three codepaths: +# * -i (no argument) +# * -C3 (pasted argument) +# * -u otheruser (non-pasted argument) +BUFFER='sudo -C3 -u otheruser -i ls /' expected_region_highlight=( "1 4 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo - "6 7 $ZSH_HIGHLIGHT_STYLES[single-hyphen-option]" # -u - "9 17 $ZSH_HIGHLIGHT_STYLES[default]" # otheruser - "19 20 $ZSH_HIGHLIGHT_STYLES[command]" # ls - "22 22 $ZSH_HIGHLIGHT_STYLES[path]" # / + "6 8 $ZSH_HIGHLIGHT_STYLES[single-hyphen-option]" # -C3 + "10 11 $ZSH_HIGHLIGHT_STYLES[single-hyphen-option]" # -u + "13 21 $ZSH_HIGHLIGHT_STYLES[default]" # otheruser + "23 24 $ZSH_HIGHLIGHT_STYLES[single-hyphen-option]" # -i + "26 27 $ZSH_HIGHLIGHT_STYLES[command]" # ls + "29 29 $ZSH_HIGHLIGHT_STYLES[path]" # / )