diff options
Diffstat (limited to 'Test/D06subscript.ztst')
-rw-r--r-- | Test/D06subscript.ztst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst index 6c9f477cc..4cb814977 100644 --- a/Test/D06subscript.ztst +++ b/Test/D06subscript.ztst @@ -178,11 +178,15 @@ >lower >upper - typeset -a empty_array - echo X${${l##*}[-1]}X + typeset -ga empty + echo X${${empty##*}[-1]}X 0:Negative index applied to substition result from empty array >XX + print $empty[(i)] $empty[(I)] +0:(i) returns 1 for empty array, (I) returns 0. +>1 0 + array=(one two three four) print X$array[0]X 0:Element zero is empty if KSH_ZERO_SUBSCRIPT is off. |