diff options
author | Denys Vlasenko | 2023-06-14 11:33:59 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-06-14 11:33:59 +0200 |
commit | 3df885abe340c5feaed212536139ee24d60e40a2 (patch) | |
tree | 18416785d09ee3f19a3effea7a75b170588ae447 /shell/hush_test/hush-arith/arith-assign-in-varexp.tests | |
parent | 5febdb122357dbe39e236c9e93d06dab328edb45 (diff) | |
download | busybox-3df885abe340c5feaed212536139ee24d60e40a2.zip busybox-3df885abe340c5feaed212536139ee24d60e40a2.tar.gz |
shell/math: fix the order of variable resolution in binops
function old new delta
arith_apply 1134 1143 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-arith/arith-assign-in-varexp.tests')
-rwxr-xr-x | shell/hush_test/hush-arith/arith-assign-in-varexp.tests | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/hush_test/hush-arith/arith-assign-in-varexp.tests b/shell/hush_test/hush-arith/arith-assign-in-varexp.tests new file mode 100755 index 0000000..920aaa7 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-assign-in-varexp.tests @@ -0,0 +1,8 @@ +exec 2>&1 +a='b=10' +b=3 +# The variables should evaluate left-to-right, +# thus b is set to 10 _before_ addition +echo 20:$((a + b)) +echo "a=$a" +echo "b=$b" |