diff options
| author | Peter Stephenson <pws@zsh.org> | 2017-04-03 10:03:13 +0100 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2017-04-03 10:04:03 +0100 |
| commit | f6ab9a281dde719e180809db52d0d142d0c0a240 (patch) | |
| tree | 905c26346e1137c14f6535739aad608aa81131d3 /Test/D06subscript.ztst | |
| parent | 40929 (replaces 40598): paramsubst() should always return scalar when PREFORK... (diff) | |
| download | zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar.gz zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar.bz2 zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar.lz zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar.xz zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.tar.zst zsh-f6ab9a281dde719e180809db52d0d142d0c0a240.zip | |
40932: Parameter subscripts need to count parentheses.
Otherwise they can terminate in the middle of an expression.
Diffstat (limited to 'Test/D06subscript.ztst')
| -rw-r--r-- | Test/D06subscript.ztst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst index 144923667..f0a858b1c 100644 --- a/Test/D06subscript.ztst +++ b/Test/D06subscript.ztst @@ -266,3 +266,10 @@ >of the gang >of the gang >of the gang + + string='abcde' + twoarg() { return $(( $2 - $1 )) } + functions -M twoarg + print ${string[1,twoarg(1,4)]} +0:Commas inside parentheses do not confuse subscripts +>abc |
