diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-18 13:25:03 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-18 13:25:03 +0000 |
commit | abae4fe16e26cf027e7c8165d27b93d74bbd18b2 (patch) | |
tree | 811bae4da4a0b6f0b370334a7f01ee5d9b9c8baf /Test/C01arith.ztst | |
parent | 5c44b0a472c6e9efdec28ef03337c484b1bc3ce1 (diff) | |
download | zsh-abae4fe16e26cf027e7c8165d27b93d74bbd18b2.tar.gz zsh-abae4fe16e26cf027e7c8165d27b93d74bbd18b2.tar.xz zsh-abae4fe16e26cf027e7c8165d27b93d74bbd18b2.zip |
23562: add KSH_ZERO_SUBSCRIPT option and leave off by default
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r-- | Test/C01arith.ztst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index e4ddebc12..0e9216aaf 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -91,8 +91,13 @@ >3.5 >4 - (( newarray[unsetvar]++ )) - (( newarray[unsetvar]++ )) + (( newarray[unsetvar] = 1 )) +2:error using unset variable as index +?(eval):1: assignment to invalid subscript range + + integer setvar=1 + (( newarray[setvar]++ )) + (( newarray[setvar]++ )) print ${(t)newarray} ${#newarray} ${newarray[1]} 0:setting array elements in math context >array 1 2 |