Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ERR__EXIT failure (was Re: zsh 5.2-test-1)
While my mind's still on the subject, here's a test (no code change) to
make sure an anonymous function is treated like a function, not like
bare braces.
pws
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index dc386a4..7bc0b48 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -713,6 +713,17 @@ F:Must be tested with a top-level script rather than source or function
)
1:ERR_EXIT triggered by status 1 within { }
+ (setopt err_exit
+ () {
+ false && true
+ print Still functioning
+ false && true
+ }
+ print OK
+ )
+1:ERR_EXIT triggered by status 1 at end of anon func
+>Still functioning
+
if zmodload zsh/system 2>/dev/null; then
(
trap 'echo TERM; exit 2' TERM
Messages sorted by:
Reverse Date,
Date,
Thread,
Author