test harness: Honour $expected_mismatch when there are more expected than observed highlights.

Required for the next commit.
This commit is contained in:
Daniel Shahaf 2020-02-28 22:31:36 +00:00
parent 619fcad067
commit 027f522300

View File

@ -155,7 +155,8 @@ run_test_internal() {
local todo= local todo=
(( $+expected_highlight_zone[4] )) && todo="# TODO $expected_highlight_zone[4]" (( $+expected_highlight_zone[4] )) && todo="# TODO $expected_highlight_zone[4]"
if ! (( $+region_highlight[i] )); then if ! (( $+region_highlight[i] )); then
print -r -- "not ok $i - unmatched expectation ($exp_start $exp_end $expected_highlight_zone[3])" print -r -- "not ok $i - unmatched expectation ($exp_start $exp_end $expected_highlight_zone[3])" \
"${expected_mismatch:+"# TODO ${(qqq)expected_mismatch}"}"
continue continue
fi fi
local -a highlight_zone; highlight_zone=( ${(z)region_highlight[i]} ) local -a highlight_zone; highlight_zone=( ${(z)region_highlight[i]} )