From 4215fcb1075f4608cf039ae9b593b07580060a70 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Tue, 25 Dec 2018 17:18:57 +0000 Subject: 43944: apply NO_UNSET consistently to arithmeitc --- Test/C01arith.ztst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Test') 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 -- cgit 1.4.1