From a33c72e8389b3d984d25fd556d86878777c76571 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 2 Nov 2017 19:12:16 -0500 Subject: [PATCH] tests: Use idiomatic set check --- tests/test-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index 94c4152..d29880d 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -137,7 +137,7 @@ run_test_internal() { local desc="[$start,$end] «${BUFFER[$start,$end]//'#'/♯}»" # Match the emptiness of observed_result if no highlighting is expected [[ $highlight_zone[3] == NONE ]] && highlight_zone[3]= - [[ -n "$highlight_zone[4]" ]] && todo="# TODO $highlight_zone[4]" + (( $+highlight_zone[4] )) && todo="# TODO $highlight_zone[4]" for j in {$start..$end}; do if [[ "$observed_result[$j]" != "$highlight_zone[3]" ]]; then print -r -- "not ok $i - $desc - expected ${(qqq)highlight_zone[3]}, observed ${(qqq)observed_result[$j]}. $todo"