From 378e364c3c6bc1638fad25e8f0e78db90b7371bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gonz=C3=A1lez?= Date: Mon, 4 Sep 2023 10:41:37 +0100 Subject: [PATCH] ssl-opt.sh: Correct print format for test cases' names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid printing an extra space when using the --list-test-cases option. Signed-off-by: Tomás González --- tests/ssl-opt.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 156e94406e..6644b0de07 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -879,15 +879,16 @@ print_name() { fi LINE="$LINE$1" - printf "%s " "$LINE" if [ "$LIST_TESTS" -gt 0 ]; then - printf "\n" - else - LEN=$(( 72 - `echo "$LINE" | wc -c` )) - for i in `seq 1 $LEN`; do printf '.'; done - printf ' ' + printf "%s\n" "$LINE" + return fi + printf "%s " "$LINE" + LEN=$(( 72 - `echo "$LINE" | wc -c` )) + for i in `seq 1 $LEN`; do printf '.'; done + printf ' ' + } # record_outcome []