xref: /freebsd/bin/sh/tests/parameters/positional9.0 (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1# Although POSIX leaves the result of expanding ${#@} and ${#*} unspecified,
2# make sure it is at least numeric.
3
4set -- bb cc ddd
5set -f
6lengths=${#*}${#@}"${#*}${#@}"$(echo ${#*}${#@}"${#*}${#@}")
7IFS=
8lengths=$lengths${#*}${#@}"${#*}${#@}"$(echo ${#*}${#@}"${#*}${#@}")
9case $lengths in
10*[!0-9]*)
11	printf 'bad: %s\n' "$lengths"
12	exit 3 ;;
13????????????????*) ;;
14*)
15	printf 'too short: %s\n' "$lengths"
16	exit 3 ;;
17esac
18