From bdb4e8b70e784e5149d7de9323074696653798cd Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 17 Mar 2020 17:06:32 +0000 Subject: [PATCH] test harness: When the cardinality check fails, pretty-print \$expected_region_highlight and \$region_highlight. --- tests/test-highlighting.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index 7d7ebb7..e8c36f5 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -212,6 +212,11 @@ run_test_internal() { details+="«$(typeset_p expected_region_highlight)» «$(typeset_p region_highlight)»" tap_escape $details; details=$REPLY print -r -- "not ok $i - cardinality check - $details${todo:+ - }$todo" + paste \ + =(print -rC1 -- "expected_region_highlight" "${(qq)expected_region_highlight[@]}") \ + =(print -rC1 -- "region_highlight" "${(qq)region_highlight[@]}") \ + | if type column >/dev/null; then column -t -s $'\t'; else cat; fi \ + | sed 's/^/# /' fi fi }