From 1c7412199a7e87a303c1faeb294400c2aac378d1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 25 Oct 2022 06:20:52 -0500 Subject: [PATCH] Another workaround for mksh not being bash. --- scripts/runtest.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 4b690e8e..1f9e8aca 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -219,14 +219,15 @@ txpect() then [ -z "$A" -o "$X" -ne 0 ] && { do_fail;break;} else - if [ ${1::1} == 'R' ] && [[ "$A" =~ ${1:2} ]]; then true + if [ ${1::1} == 'R' ] && grep -q "${1:2}" <<< "$A"; then true elif [ ${1::1} != 'R' ] && [ "$A" == "${1:1}" ]; then true else # Append the rest of the output if there is any. read -t.1 B <&$O A="$A$B" read -t.1 -rN 9999 B<&$ERR - do_fail;break; + do_fail + break fi fi ;; -- 2.39.2