zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Zsh hackers list" <zsh-workers@zsh.org>
Cc: "Greg Klanderman" <gak@klanderman.net>
Subject: Re: using trap function to cleanup and exit?
Date: Sun, 17 Apr 2022 17:08:44 +0000	[thread overview]
Message-ID: <b9035b6f-e356-49fe-8eb5-a9d4f20f192c@www.fastmail.com> (raw)
In-Reply-To: <CAH+w=7YczhLbVDbosuCBgVsUNnb707r3sZJP51ngxO9q+mNF-A@mail.gmail.com>

Bart Schaefer wrote on Thu, 14 Apr 2022 23:35 +00:00:
> On Thu, Apr 14, 2022 at 2:29 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>>
>> I've therefore included cleaning up the BUGS file and reversing the
>> sense of that test
>
> I suppose I should also have reversed the sense of the test description.
>
> diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
> index 3bd2958cb..8d1283552 100644
> --- a/Test/C03traps.ztst
> +++ b/Test/C03traps.ztst
> @@ -901,7 +901,7 @@ F:Must be tested with a top-level script rather
> than source or function
>   fn trap1 trap2
>   echo out2
>   '
> --:(workers/44007) function execution continues after 'exit' in trap
> +-:'exit' in trap causes calling function to return

Change «-» to «0» (or whatever exit code is appropriate)?

When a test is XFail ('f' flag), I like to write its expectations as
minimally as possible, in order to make it easy for the test to XPass
("was expected to fail, but passed"); however, once the bug is fixed and
the test starts to pass (= without 'f'), expectations can be tightened.

Not awake enough to review the C changes right now, sorry.

Cheers,

Daniel


>  >out1
>  >fn1
>  >trap1


  reply	other threads:[~2022-04-17 17:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 15:46 Greg Klanderman
2022-04-10 15:57 ` Peter Stephenson
2022-04-10 16:12   ` Greg Klanderman
2022-04-10 16:30     ` Greg Klanderman
2022-04-10 18:15       ` Lawrence Velázquez
2022-04-14  5:13         ` Greg Klanderman
2022-04-10 20:49       ` Bart Schaefer
2022-04-10 20:55         ` Bart Schaefer
2022-04-14  5:57         ` Greg Klanderman
2022-04-14 21:29           ` Bart Schaefer
2022-04-14 23:35             ` Bart Schaefer
2022-04-17 17:08               ` Daniel Shahaf [this message]
2022-04-15 22:27             ` Bart Schaefer
2022-04-19 18:42               ` Peter Stephenson
2022-04-19 18:55                 ` Peter Stephenson
2022-04-19 21:22                   ` Bart Schaefer
2022-04-20  8:16                     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9035b6f-e356-49fe-8eb5-a9d4f20f192c@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=gak@klanderman.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).