test harness: Rewrite the columnar pretty-printer without external tools.

This commit is contained in:
Daniel Shahaf 2020-03-19 05:01:37 +00:00
parent 90a92b2bb8
commit ea7c165b59

View file

@ -230,10 +230,7 @@ run_test_internal() {
if (( difference > 0 )); then
left_column+=( ${(r:2*difference::. :):-} )
fi
paste \
=(print -rC1 -- $left_column) \
=(print -rC1 -- $right_column) \
| if type column >/dev/null; then column -t -s $'\t'; else cat; fi \
print -rC2 -- "${left_column[@]}" "${right_column[@]}" \
| sed 's/^/# /'
}
fi