test harness: Fix the pretty-printer's padding implementation.

The new implementation is less efficient but definitely correct.
This commit is contained in:
Daniel Shahaf 2020-03-19 22:45:37 +00:00
parent d5d2f22013
commit 2904e0f986

View File

@ -227,9 +227,7 @@ run_test_internal() {
left_column=( "expected_region_highlight" "${(qq)expected_region_highlight[@]}" )
right_column=( "region_highlight" "${(qq)region_highlight[@]}" )
integer difference=$(( $#right_column - $#left_column ))
if (( difference > 0 )); then
left_column+=( ${(r:2*difference::. :):-} )
fi
repeat $difference do left_column+=(.); done
paste \
=(print -rC1 -- $left_column) \
=(print -rC1 -- $right_column) \