]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/bin/sh/expansion/ifs3.0
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / bin / sh / expansion / ifs3.0
1 # $FreeBSD$
2
3 failures=0
4 unset LC_ALL
5 export LC_CTYPE=en_US.ISO8859-1
6 i=128
7 set -f
8 while [ "$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))
20 done
21 exit $((failures > 0))