aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-04-15 11:27:18 -0700
committerRob Landley <rob@landley.net>2017-04-17 13:04:58 -0500
commit8d826bf4499d390f91296dd286cd5e847070fd78 (patch)
tree3a8414b71fb590b92e61553f578360fa463287c4 /tests
parent151ac30a9fb2252f5fa77e0238c5f944d5b4659c (diff)
downloadtoybox-8d826bf4499d390f91296dd286cd5e847070fd78.tar.gz
Use $(( rather than $[ for arithmetic in expand.test.
I can't find any reference to $[ for arithmetic on the bash man page, but it seems to be a synonym for $((. mksh doesn't support this, so the expand tests that use it fail on Android. No other toybox tests are using $[.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/expand.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/expand.test b/tests/expand.test
index d93d0707..3dcdb1c3 100755
--- a/tests/expand.test
+++ b/tests/expand.test
@@ -20,10 +20,10 @@ TABSTOP=1
BIGTAB=" "
for i in $(seq $POW); do
BIGTAB=$BIGTAB$BIGTAB
- TABSTOP=$[$TABSTOP*2]
+ TABSTOP=$(($TABSTOP*2))
done
testing "long tab single" "expand -t $TABSTOP input" "${BIGTAB}foo\n" "\tfoo\n" ""
-testing "long tab tablist" "expand -t $TABSTOP,$[TABSTOP+5] input" \
+testing "long tab tablist" "expand -t $TABSTOP,$((TABSTOP+5)) input" \
"${BIGTAB}foo bar\n" "\tfoo\tbar\n" ""
testing "multiline single" "expand -t 4 input" "foo \n bar\n" "foo\t\n\tbar\n" ""