redo-sh: keep testing even after finding a 'good' shell.
Otherwise we miss out on seeing the results from additional tests.
This commit is contained in:
parent
d55e329018
commit
eea3f5446a
2 changed files with 5 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ mkdir $1.new
|
||||||
GOOD=
|
GOOD=
|
||||||
WARN=
|
WARN=
|
||||||
|
|
||||||
for sh in dash sh ash ksh pdksh bash zsh busybox; do
|
for sh in dash sh ash ksh ksh88 ksh93 pdksh bash zsh busybox; do
|
||||||
printf "Testing %s... " "$sh"
|
printf "Testing %s... " "$sh"
|
||||||
FOUND=`which $sh 2>/dev/null` || { echo "missing"; continue; }
|
FOUND=`which $sh 2>/dev/null` || { echo "missing"; continue; }
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ for sh in dash sh ash ksh pdksh bash zsh busybox; do
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
case $RV in
|
case $RV in
|
||||||
0) echo "good"; GOOD=$FOUND; break ;;
|
0) echo "good"; [ -n "$GOOD" ] || GOOD=$FOUND ;;
|
||||||
42) echo "warnings"; [ -n "$WARN" ] || WARN=$FOUND ;;
|
42) echo "warnings"; [ -n "$WARN" ] || WARN=$FOUND ;;
|
||||||
*) echo "failed" ;;
|
*) echo "failed" ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -168,8 +168,8 @@ echo "`printf 'foo\r\n'`"" bar" | diff -q - broken || fail 59
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# This one is too obnoxious. dash and ash pass the test, but nothing else does,
|
# This one is too obnoxious. dash and ash pass the test, but nothing else
|
||||||
# and this case is just too dumb to care about. Just don't do that!
|
# does, and this case is just too dumb to care about. Just don't do that!
|
||||||
#
|
#
|
||||||
#t=`echo $(case x in x) echo hello;; esac)`
|
#t=`echo $(case x in x) echo hello;; esac)`
|
||||||
#[ "$t" = "hello" ] || fail 60
|
#[ "$t" = "hello" ] || fail 60
|
||||||
|
|
@ -194,6 +194,7 @@ t2=$(for d in this-glob-does-*-not-exist; do echo "$d"; done)
|
||||||
false || foo=bar; [ "$?" = 0 ] || fail 71
|
false || foo=bar; [ "$?" = 0 ] || fail 71
|
||||||
foo=`exit 1`; [ "$?" != 0 ] || fail 72
|
foo=`exit 1`; [ "$?" != 0 ] || fail 72
|
||||||
|
|
||||||
|
|
||||||
# http://www.gnu.org/software/hello/manual/autoconf/Shell-Functions.html
|
# http://www.gnu.org/software/hello/manual/autoconf/Shell-Functions.html
|
||||||
f1() { echo 1; }
|
f1() { echo 1; }
|
||||||
f2(){ echo 2;}
|
f2(){ echo 2;}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue