]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/expansion/arith6.0
shell_cmds-207.11.1.tar.gz
[apple/shell_cmds.git] / sh / tests / expansion / arith6.0
1 # $FreeBSD: head/bin/sh/tests/expansion/arith6.0 215550 2010-11-19 22:25:32Z jilles $
2
3 v1=1\ +\ 1
4 v2=D
5 v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
6 f() { v4="$*"; }
7
8 while [ ${#v2} -lt 1250 ]; do
9 eval $v2=$((3+${#v2})) $v3=$((4-${#v2}))
10 eval f $(($v2+ $v1 +$v3))
11 if [ $v4 -ne 9 ]; then
12 echo bad: $v4 -ne 9 at ${#v2}
13 fi
14 v2=x$v2
15 v3=y$v3
16 done