From 60639c67f0cdab2b89fce481753f791321aa53de Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 14 May 2025 16:24:13 +0000 Subject: users/30257: Add a test for an ERR_RETURN bug fixed in workers/51076. --- Test/E01options.ztst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Test') diff --git a/Test/E01options.ztst b/Test/E01options.ztst index 363846f5c..969bd42d5 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -1536,3 +1536,13 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst. 0:readonly with typeset -p F:compare E03posix.ztst >typeset -r var='' + + $ZTST_testdir/../Src/zsh -fc " + foo(){ + setopt err_return + source <(echo 'if true; then return 42; fi') + echo \"This line is printed by zsh 5.9 (but it shouldn't be).\" + } + foo + " +42:ERR_RETURN inside 'source' and 'if' -- cgit v1.2.3-70-g09d2