From 78290e043bc51122378d6559054a47f23e143e8b Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Sat, 2 Apr 2016 20:40:54 -0500 Subject: [PATCH] tests: Expect the correct style --- highlighters/main/test-data/anonymous-function.zsh | 4 ++-- highlighters/main/test-data/assign-semicolon.zsh | 2 +- highlighters/main/test-data/backslash-continuation.zsh | 2 +- highlighters/main/test-data/comments.zsh | 2 +- highlighters/main/test-data/multiple-redirections.zsh | 10 +++++----- highlighters/main/test-data/precommand.zsh | 2 +- highlighters/main/test-data/simple-redirection.zsh | 2 +- highlighters/main/test-data/subshell.zsh | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/highlighters/main/test-data/anonymous-function.zsh b/highlighters/main/test-data/anonymous-function.zsh index 57ab884..e301a66 100644 --- a/highlighters/main/test-data/anonymous-function.zsh +++ b/highlighters/main/test-data/anonymous-function.zsh @@ -31,10 +31,10 @@ BUFFER='() echo hello; () { echo world }' expected_region_highlight=( "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 "14 14 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ; "16 17 ${(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 ) diff --git a/highlighters/main/test-data/assign-semicolon.zsh b/highlighters/main/test-data/assign-semicolon.zsh index e76d260..9b81195 100644 --- a/highlighters/main/test-data/assign-semicolon.zsh +++ b/highlighters/main/test-data/assign-semicolon.zsh @@ -32,5 +32,5 @@ BUFFER='A=1; echo hello world' expected_region_highlight=( "4 4 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # ; - "6 9 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # echo + "6 9 ${(q-)ZSH_HIGHLIGHT_STYLES[builtin]}" # echo ) diff --git a/highlighters/main/test-data/backslash-continuation.zsh b/highlighters/main/test-data/backslash-continuation.zsh index 9fbd916..e1fd1d3 100644 --- a/highlighters/main/test-data/backslash-continuation.zsh +++ b/highlighters/main/test-data/backslash-continuation.zsh @@ -31,5 +31,5 @@ PREBUFFER=$'echo \\\n' BUFFER='noglob' 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 ) diff --git a/highlighters/main/test-data/comments.zsh b/highlighters/main/test-data/comments.zsh index 24ed51c..0ef4956 100644 --- a/highlighters/main/test-data/comments.zsh +++ b/highlighters/main/test-data/comments.zsh @@ -32,7 +32,7 @@ setopt interactive_comments BUFFER='echo "foo #bar" #baz # quux' 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" "17 27 ${(q-)ZSH_HIGHLIGHT_STYLES[comment]}" # #baz # quux ) diff --git a/highlighters/main/test-data/multiple-redirections.zsh b/highlighters/main/test-data/multiple-redirections.zsh index e842239..5dc8931 100644 --- a/highlighters/main/test-data/multiple-redirections.zsh +++ b/highlighters/main/test-data/multiple-redirections.zsh @@ -32,15 +32,15 @@ BUFFER='ps aux | grep java | sort | uniq | tail | head' expected_region_highlight=( "1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps "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 "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 - "27 27 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | + "27 27 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # | "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 - "41 41 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # | + "41 41 ${(q-)ZSH_HIGHLIGHT_STYLES[commandseparator]}" # | "43 46 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # head ) diff --git a/highlighters/main/test-data/precommand.zsh b/highlighters/main/test-data/precommand.zsh index 3ec941a..e2fc541 100644 --- a/highlighters/main/test-data/precommand.zsh +++ b/highlighters/main/test-data/precommand.zsh @@ -31,7 +31,7 @@ ZSH_HIGHLIGHT_STYLES[assign]=$unused_highlight BUFFER=': command zzzzzz' 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 "11 16 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # not unknown-token (since 'zzzzzz' is not a command) ) diff --git a/highlighters/main/test-data/simple-redirection.zsh b/highlighters/main/test-data/simple-redirection.zsh index 11e5ec7..f4bd696 100644 --- a/highlighters/main/test-data/simple-redirection.zsh +++ b/highlighters/main/test-data/simple-redirection.zsh @@ -32,7 +32,7 @@ BUFFER='ps aux | grep java' expected_region_highlight=( "1 2 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # ps "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 "15 18 ${(q-)ZSH_HIGHLIGHT_STYLES[default]}" # java ) diff --git a/highlighters/main/test-data/subshell.zsh b/highlighters/main/test-data/subshell.zsh index c02de9d..17110ed 100644 --- a/highlighters/main/test-data/subshell.zsh +++ b/highlighters/main/test-data/subshell.zsh @@ -32,7 +32,7 @@ BUFFER='tar cf - * | (cd /target; tar xfp -) | { cat }' expected_region_highlight=( "1 3 ${(q-)ZSH_HIGHLIGHT_STYLES[command]}" # tar "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 "36 36 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # ) "40 40 ${(q-)ZSH_HIGHLIGHT_STYLES[reserved-word]}" # {