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.
This commit is contained in:
Matthew Martin 2016-04-30 12:35:41 -05:00
parent c346f6eb6f
commit 4da9889d15
2 changed files with 2 additions and 1 deletions

View File

@ -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
)

View File

@ -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