From ec57c91b586a7682fcdb08c3704c9214cddfa5e7 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 13 May 2015 16:17:04 +0100 Subject: users/20203: nested functions in always blocks when exit pending --- Test/A01grammar.ztst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Test/A01grammar.ztst') diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index f04dddaa8..2de291906 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -589,3 +589,25 @@ >success2 >read it >read it + + ( + mywrap() { echo BEGIN; true; echo END } + mytest() { { exit 3 } always { mywrap }; print Exited before this } + mytest + print Exited before this, too + ) +3:Exit and always block with functions: simple +>BEGIN +>END + + ( + mytrue() { echo mytrue; return 0 } + mywrap() { echo BEGIN; mytrue; echo END } + mytest() { { exit 4 } always { mywrap }; print Exited before this } + mytest + print Exited before this, too + ) +4:Exit and always block with functions: nested +>BEGIN +>mytrue +>END -- cgit 1.4.1