From 027f5223007cc233266a8c79c9ed9525fea2c1f9 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 28 Feb 2020 22:31:36 +0000 Subject: [PATCH] test harness: Honour $expected_mismatch when there are more expected than observed highlights. Required for the next commit. --- tests/test-highlighting.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index ab5f2d5..be95b51 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -155,7 +155,8 @@ run_test_internal() { local todo= (( $+expected_highlight_zone[4] )) && todo="# TODO $expected_highlight_zone[4]" 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 fi local -a highlight_zone; highlight_zone=( ${(z)region_highlight[i]} )