]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/expansion/ifs3.0
shell_cmds-198.tar.gz
[apple/shell_cmds.git] / sh / tests / expansion / ifs3.0
CommitLineData
71aad674
A
1# $FreeBSD$
2
3failures=0
4unset LC_ALL
5export LC_CTYPE=en_US.ISO8859-1
6i=128
7set -f
8while [ "$i" -le 255 ]; do
9 i2=$((i^2))
10 c=$(printf \\"$(printf %o "$i")")
11 c2=$(printf \\"$(printf %o "$i2")")
12 IFS=$c
13 set -- $c2$c$c2$c$c2
14 if [ "$#" -ne 3 ] || [ "$1" != "$c2" ] || [ "$2" != "$c2" ] ||
15 [ "$3" != "$c2" ]; then
16 echo "Bad results for separator $i (word $i2)" >&2
17 : $((failures += 1))
18 fi
19 i=$((i+1))
20done
21exit $((failures > 0))