summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorMartijn Dekker <martijn@inlv.org>2018-12-25 17:18:57 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2018-12-30 18:03:02 +0000
commit4215fcb1075f4608cf039ae9b593b07580060a70 (patch)
tree2586b5122d62b4715afdd0a14fb1866d0b20b6d1 /Test
parentd0f92b448e74206a08ee2718d74766b9e9ddd349 (diff)
downloadzsh-4215fcb1075f4608cf039ae9b593b07580060a70.tar.gz
zsh-4215fcb1075f4608cf039ae9b593b07580060a70.tar.xz
zsh-4215fcb1075f4608cf039ae9b593b07580060a70.zip
43944: apply NO_UNSET consistently to arithmeitc
Diffstat (limited to 'Test')
-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