testsuite/hostid/hostid-works+4 -6
| @@ -1,8 +1,6 @@ |
| h=x$(busybox hostid) |
| # Is $h a sequence of hex numbers? |
| - | x="${h//[0123456789abcdef]/x}" |
| - | x="${x//xxx/x}" |
| - | x="${x//xxx/x}" |
| - | x="${x//xxx/x}" |
| - | x="${x//xx/x}" |
| - | test x"$x" = x"x" |
| + | case "$h" in |
| + | x*[!0-9a-f]*) false;; |
| + | *) true;; |
| + | esac |
testsuite/md5sum.tests+3 -3
| @@ -30,13 +30,13 @@ result=`( |
| n=0 |
| while test $n -le 999; do |
| echo "$text" | head -c $n | "$sum" |
| - | : $((n++)) |
| + | n=$(($n+1)) |
| done | "$sum" |
| )` |
| |
| if test x"$result" = x"$expected -"; then |
| - | echo "PASS: $sum" |
| - | exit 0 |
| + | echo "PASS: $sum" |
| + | exit 0 |
| fi |
| |
| echo "FAIL: $sum (r:$result exp:$expected)" |
testsuite/testing.sh+4 -4
| @@ -56,10 +56,10 @@ optional() |
| { |
| SKIP= |
| while test "$1"; do |
| - | if test x"${OPTIONFLAGS/*:$1:*/y}" != x"y"; then |
| - | SKIP=1 |
| - | return |
| - | fi |
| + | case "${OPTIONFLAGS}" in |
| + | *:$1:*) ;; |
| + | *) SKIP=1; return ;; |
| + | esac |
| shift |
| done |
| } |
testsuite/which/which-uses-default-path+1 -1
| @@ -1,4 +1,4 @@ |
| - | BUSYBOX=$(type -p busybox) |
| + | BUSYBOX=$(command -pv busybox) |
| SAVED_PATH=$PATH |
| unset PATH |
| $BUSYBOX which ls |