From 4da9889d154509a8ee30605618d2256cf511cae4 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Sat, 30 Apr 2016 12:35:41 -0500 Subject: [PATCH] tests: Use 'NONE' to denote no highlighting 'none' is a valid highlighting type. Since by convention styles are all lowercase, 'NONE' shouldn't conflict with anything. Closes #289. --- highlighters/brackets/test-data/quoted-patentheses.zsh | 2 +- tests/test-highlighting.zsh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/highlighters/brackets/test-data/quoted-patentheses.zsh b/highlighters/brackets/test-data/quoted-patentheses.zsh index 954445e..5c3dcea 100644 --- a/highlighters/brackets/test-data/quoted-patentheses.zsh +++ b/highlighters/brackets/test-data/quoted-patentheses.zsh @@ -30,5 +30,5 @@ BUFFER='echo "foo ( bar"' expected_region_highlight=( -"1 16 none" # We expect the brackets highlighter to do nothing +"1 16 NONE" # We expect the brackets highlighter to do nothing ) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index e3c7415..73dc098 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -101,6 +101,7 @@ run_test_internal() { for ((i=1; i<=${#expected_region_highlight}; i++)); do local todo= highlight_zone=${(z)expected_region_highlight[$i]} + [[ $highlight_zone[3] == NONE ]] && highlight_zone[3]= [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" for j in {$highlight_zone[1]..$highlight_zone[2]}; do if [[ "$observed_result[$j]" != "$ZSH_HIGHLIGHT_STYLES[$highlight_zone[3]]" ]]; then