summaryrefslogtreecommitdiff
path: root/Test/C01arith.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r--Test/C01arith.ztst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index f1364ab36..9dfc065c8 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -471,3 +471,19 @@
print $(( -2#101-16#f ))
0: Unary minus doesn't apply to base but to number as a whole.
>-20
+
+ ( set -o nounset
+ true $(( noexist + 1 ))
+ echo 'should never get here' )
+1:Arithmetic, NO_UNSET part 1
+?(eval):2: noexist: parameter not set
+
+ ( setopt nounset
+ (( noexist++ )) )
+2:Arithmetic, NO_UNSET part 2
+?(eval):2: noexist: parameter not set
+
+ ( unsetopt unset
+ let noexist==0 )
+1:Arithmetic, NO_UNSET part 3
+?(eval):2: noexist: parameter not set