Skip to content

Commit bdb4e8b

Browse files
committed
test harness: When the cardinality check fails, pretty-print \$expected_region_highlight and \$region_highlight.
1 parent e6eea1f commit bdb4e8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test-highlighting.zsh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ run_test_internal() {
212212
details+="«$(typeset_p expected_region_highlight)» «$(typeset_p region_highlight)»"
213213
tap_escape $details; details=$REPLY
214214
print -r -- "not ok $i - cardinality check - $details${todo:+ - }$todo"
215+
paste \
216+
=(print -rC1 -- "expected_region_highlight" "${(qq)expected_region_highlight[@]}") \
217+
=(print -rC1 -- "region_highlight" "${(qq)region_highlight[@]}") \
218+
| if type column >/dev/null; then column -t -s $'\t'; else cat; fi \
219+
| sed 's/^/# /'
215220
fi
216221
fi
217222
}

0 commit comments

Comments
 (0)