]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/expansion/arith6.0
shell_cmds-207.11.1.tar.gz
[apple/shell_cmds.git] / sh / tests / expansion / arith6.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/expansion/arith6.0 215550 2010-11-19 22:25:32Z jilles $
71aad674
A
2
3v1=1\ +\ 1
4v2=D
5v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
6f() { v4="$*"; }
7
8while [ ${#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
16done