diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-15 11:19:15 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-15 11:22:13 +0200 |
commit | 61a4959251667751e424e600c6cb75de39d6b1c3 (patch) | |
tree | 3207a4f46eeac1db063c7b0edd0181661e781d3f /shell/ash_test/ash-arith | |
parent | 5f56a0388271d2de6cf31af1041bdcb3d11029fc (diff) | |
download | busybox-w32-61a4959251667751e424e600c6cb75de39d6b1c3.tar.gz busybox-w32-61a4959251667751e424e600c6cb75de39d6b1c3.tar.bz2 busybox-w32-61a4959251667751e424e600c6cb75de39d6b1c3.zip |
shell/math: remove special code to handle a?b?c:d:e, it works without it now
The "hack" to virtually parenthesize ? EXPR : made this unnecessary.
The expression is effectively a?(b?(c):d):e and thus b?c:d is evaluated
before continuing with the second :
function old new delta
evaluate_string 1148 1132 -16
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-arith')
-rw-r--r-- | shell/ash_test/ash-arith/arith-ternary_nested2.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-arith/arith-ternary_nested2.tests | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested2.right b/shell/ash_test/ash-arith/arith-ternary_nested2.right new file mode 100644 index 000000000..d80319695 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested2.right | |||
@@ -0,0 +1 @@ | |||
3:3 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested2.tests b/shell/ash_test/ash-arith/arith-ternary_nested2.tests new file mode 100755 index 000000000..e8b8a9e1a --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested2.tests | |||
@@ -0,0 +1,2 @@ | |||
1 | exec 2>&1 | ||
2 | echo 3:$((0?1:2?3:4?5:6?7:8)) | ||