diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-02-22 21:32:08 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-02-22 21:32:08 +0000 |
commit | 6fa63a0ce2b2aa31a343ca0841b57895d11b5754 (patch) | |
tree | ec3acbb12ccb523f55bab6e92390b4117f9fe238 /Test | |
parent | bcc4ab792d415039fea3afa2976df09f66477721 (diff) | |
download | zsh-6fa63a0ce2b2aa31a343ca0841b57895d11b5754.tar.gz zsh-6fa63a0ce2b2aa31a343ca0841b57895d11b5754.tar.xz zsh-6fa63a0ce2b2aa31a343ca0841b57895d11b5754.zip |
34606: fix up nested arithmetic substitution
Arithmetic within a parameter substitution is a special case that needs fixing with the introduction of the new Inparmath token. Add test.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/C01arith.ztst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index 67d78ee13..d3176dd5e 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -300,6 +300,7 @@ print $(( 0b2 )) 1:Binary numbers don't tend to have 2's in ?(eval):1: bad math expression: operator expected at `2 ' +# ` for emacs shell mode integer varassi print $(( varassi = 5.5 / 2.0 )) @@ -376,3 +377,10 @@ esac)) 0:Would-be math expansion with extra parenthesis making it a cmd subst >Worked OK + + (setopt extendedglob + set -- 32.463 + print ${$(( $1 * 100 ))%%.[0-9]#}) +0:Arithmetic substitution nested in parameter substitution +>3246 + |