diff options
| author | Oliver Kiddle <opk@users.sourceforge.net> | 2004-03-30 16:35:30 +0000 |
|---|---|---|
| committer | Oliver Kiddle <opk@users.sourceforge.net> | 2004-03-30 16:35:30 +0000 |
| commit | 3023ddf132825bb29c94fbd0860b7785887cc5c5 (patch) | |
| tree | 1b16fe2675ae87dbe8baf805cb40bcdcbc7f1fb6 /Test/D05array.ztst | |
| parent | * 19691: Completion/Unix/Type/_diff_options: Allow more than (diff) | |
| download | zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar.gz zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar.bz2 zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar.lz zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar.xz zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.tar.zst zsh-3023ddf132825bb29c94fbd0860b7785887cc5c5.zip | |
19707: negative index into arrays should return scalar and not one element array
Diffstat (limited to 'Test/D05array.ztst')
| -rw-r--r-- | Test/D05array.ztst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/D05array.ztst b/Test/D05array.ztst index 35976899c..5ca83ee6d 100644 --- a/Test/D05array.ztst +++ b/Test/D05array.ztst @@ -3,6 +3,7 @@ %prep foo=(a b c d e f g) + arr=(foo bar baz) mkdir array.tmp touch array.tmp/{1..9} @@ -60,6 +61,20 @@ 0:A slice with a negative start and end >.b c d e f. + echo .${${arr[2]}[1]}. + echo .${${arr[-2]}[1]}. + echo .${${arr[2,2]}[1]}. + echo .${${arr[-2,-2]}[1]}. + echo .${${arr[2,-2]}[1]}. + echo .${${arr[-2,2]}[1]}. +0:Slices should return an array, elements a scalar +>.b. +>.b. +>.bar. +>.bar. +>.bar. +>.bar. + setopt ksh_arrays echo .${foo[1,2]}. unsetopt ksh_arrays |
