tests: Expect the correct style

This commit is contained in:
Matthew Martin 2016-04-02 20:40:54 -05:00
parent 31ac2b36a9
commit 78290e043b
8 changed files with 13 additions and 13 deletions

View File

@ -31,10 +31,10 @@ BUFFER='() echo hello; () { echo world }'
expected_region_highlight=( expected_region_highlight=(
"1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # () "1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # ()
"4 7 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # echo "4 7 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # echo
"9 13 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # hello "9 13 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # hello
"14 14 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ; "14 14 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ;
"16 17 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # () "16 17 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # ()
"19 19 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # { "19 19 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # {
"21 24 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # echo "21 24 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # echo
) )

View File

@ -32,5 +32,5 @@ BUFFER='A=1; echo hello world'
expected_region_highlight=( expected_region_highlight=(
"4 4 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ; "4 4 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ;
"6 9 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # echo "6 9 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # echo
) )

View File

@ -31,5 +31,5 @@ PREBUFFER=$'echo \\\n'
BUFFER='noglob' BUFFER='noglob'
expected_region_highlight=( expected_region_highlight=(
"1 6 none" # 'noglob' highlighted as a string, not as a precomand "1 6 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # 'noglob' highlighted as a string, not as a precomand
) )

View File

@ -32,7 +32,7 @@ setopt interactive_comments
BUFFER='echo "foo #bar" #baz # quux' BUFFER='echo "foo #bar" #baz # quux'
expected_region_highlight=( expected_region_highlight=(
"1 4 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # echo "1 4 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # echo
"6 15 ${(q-)ZSH_HIGHLIGHT_STYLES[double-quoted-argument]}" # "foo #bar" "6 15 ${(q-)ZSH_HIGHLIGHT_STYLES[double-quoted-argument]}" # "foo #bar"
"17 27 ${(q-)ZSH_HIGHLIGHT_STYLES[comment]}" # #baz # quux "17 27 ${(q-)ZSH_HIGHLIGHT_STYLES[comment]}" # #baz # quux
) )

View File

@ -32,15 +32,15 @@ BUFFER='ps aux | grep java | sort | uniq | tail | head'
expected_region_highlight=( expected_region_highlight=(
"1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps "1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps
"4 6 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # aux "4 6 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # aux
"8 8 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "8 8 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"10 13 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # grep "10 13 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # grep
"15 18 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # java "15 18 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # java
"20 20 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "20 20 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"22 25 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # sort "22 25 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # sort
"27 27 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "27 27 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"29 32 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # uniq "29 32 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # uniq
"34 34 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "34 34 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"36 39 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tail "36 39 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tail
"41 41 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "41 41 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"43 46 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # head "43 46 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # head
) )

View File

@ -31,7 +31,7 @@ ZSH_HIGHLIGHT_STYLES[assign]=$unused_highlight
BUFFER=': command zzzzzz' BUFFER=': command zzzzzz'
expected_region_highlight=( expected_region_highlight=(
"1 1 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ls "1 1 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # :
"3 9 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # not precommand "3 9 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # not precommand
"11 16 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # not unknown-token (since 'zzzzzz' is not a command) "11 16 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # not unknown-token (since 'zzzzzz' is not a command)
) )

View File

@ -32,7 +32,7 @@ BUFFER='ps aux | grep java'
expected_region_highlight=( expected_region_highlight=(
"1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps "1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps
"4 6 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # aux "4 6 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # aux
"8 8 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | "8 8 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # |
"10 13 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # grep "10 13 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # grep
"15 18 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # java "15 18 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # java
) )

View File

@ -32,7 +32,7 @@ BUFFER='tar cf - * | (cd /target; tar xfp -) | { cat }'
expected_region_highlight=( expected_region_highlight=(
"1 3 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tar "1 3 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tar
"14 14 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # ( "14 14 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # (
"15 16 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # cd "15 16 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # cd
"27 29 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tar "27 29 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tar
"36 36 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # ) "36 36 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # )
"40 40 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # { "40 40 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # {