xref: /freebsd/bin/sh/tests/parameters/positional9.0 (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
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