mirror of
https://git.busybox.net/busybox.git
synced 2024-11-27 23:53:29 +08:00
shell: document another arithmetic discrepancy with bash
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
648f506949
commit
22cb0d573a
2
shell/ash_test/ash-arith/arith-assign-in-varexp1.right
Normal file
2
shell/ash_test/ash-arith/arith-assign-in-varexp1.right
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
7:7
|
||||||
|
x=3
|
9
shell/ash_test/ash-arith/arith-assign-in-varexp1.tests
Executable file
9
shell/ash_test/ash-arith/arith-assign-in-varexp1.tests
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
exec 2>&1
|
||||||
|
a='x=1'
|
||||||
|
b='x=2'
|
||||||
|
c='x=3'
|
||||||
|
# The variables should evaluate immediately when they encountered,
|
||||||
|
# not when they go into an operation. Here, order of evaluation
|
||||||
|
# of names to numbers should be a,b,c - not b,c,a:
|
||||||
|
echo 7:$((a+b*c))
|
||||||
|
echo "x=$x"
|
Loading…
Reference in New Issue
Block a user