From 8d826bf4499d390f91296dd286cd5e847070fd78 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sat, 15 Apr 2017 11:27:18 -0700 Subject: 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 $[. --- tests/expand.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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" "" -- cgit v1.2.3