mirror of
https://codeberg.org/landley/toybox.git
synced 2026-01-26 14:13:25 +00:00
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 $[.
This commit is contained in:
parent
151ac30a9f
commit
8d826bf449
@ -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" ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user