diff options
author | Rob Landley <rob@landley.net> | 2022-10-25 06:20:52 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2022-10-25 06:20:52 -0500 |
commit | 1c7412199a7e87a303c1faeb294400c2aac378d1 (patch) | |
tree | 8d85dadb71000f294b3df720ffcd6121bdf8f2cb | |
parent | 1cd2c07f94c33805a52fb4fc7a08c1f9666883a0 (diff) | |
download | toybox-1c7412199a7e87a303c1faeb294400c2aac378d1.tar.gz |
Another workaround for mksh not being bash.
-rw-r--r-- | scripts/runtest.sh | 5 |
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 ;; |