aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2022-10-25 06:20:52 -0500
committerRob Landley <rob@landley.net>2022-10-25 06:20:52 -0500
commit1c7412199a7e87a303c1faeb294400c2aac378d1 (patch)
tree8d85dadb71000f294b3df720ffcd6121bdf8f2cb
parent1cd2c07f94c33805a52fb4fc7a08c1f9666883a0 (diff)
downloadtoybox-1c7412199a7e87a303c1faeb294400c2aac378d1.tar.gz
Another workaround for mksh not being bash.
-rw-r--r--scripts/runtest.sh5
1 files 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
;;