From 60639c67f0cdab2b89fce481753f791321aa53de Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 14 May 2025 16:24:13 +0000 Subject: [PATCH] users/30257: Add a test for an ERR_RETURN bug fixed in workers/51076. --- ChangeLog | 3 +++ Test/E01options.ztst | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6e7f96f41..28f12031b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2025-05-14 Daniel Shahaf + * users/30257: Test/E01options.ztst: Add a test for an ERR_RETURN + bug fixed in workers/51076. Thanks to James Widman. + * 53607: Src/utils.c, Test/B13whence.ztst: Stop printing /usr/bin/foo -> /usr/bin/foo in 'whence -s'. 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'