summaryrefslogtreecommitdiff
path: root/Test/C01arith.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r--Test/C01arith.ztst9
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