Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT)
- X-seq: zsh-workers 50960
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Philippe Altherr <philippe.altherr@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT)
- Date: Sun, 13 Nov 2022 14:27:04 -0800
- Archived-at: <https://zsh.org/workers/50960>
- In-reply-to: <CAGdYchvPG9XCQWAm=AD3Q4QtbihLzsG-REZAq1pw6zchkGKGhw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYchsPpEMNwWFtukBS1ZzWob_hZOm8Mnnmp9Uey2T4pWs63g@mail.gmail.com> <CAGdYchu66aYu+3yzYGtMnNcT6GcWziWe9YWNqOv5_T=JpCynRg@mail.gmail.com> <CAH+w=7YD3jXE5Yy+J-dQVNVeJagHPH6HeFsavKjzAPJyaGDGWA@mail.gmail.com> <CAGdYchvTBX8o5PZgZwDy6C6TRqyFrd+M7A-dXJHP3t1zAuRHdQ@mail.gmail.com> <CAH+w=7YpsK2T6q1=-PAKkgyHov68U5YcdryLGhvBjrSYcYk7tQ@mail.gmail.com> <CAH+w=7YObj4JKfwk-au2FHrpP-+SwLr=sTJJokRU-sEvVydEpQ@mail.gmail.com> <CAGdYchtTNtEwOeeNSGkUKDRyu1ZWAPF_z8bCtaPe8od=qKptRA@mail.gmail.com> <CAGdYchvPG9XCQWAm=AD3Q4QtbihLzsG-REZAq1pw6zchkGKGhw@mail.gmail.com>
On Sun, Nov 13, 2022 at 12:56 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Here is one thing that could explain why the "where" [sic] statement is an outlier (at least compared to the other compound commands that I have tested so far). It's the only case where after evaluating "false && true" you have to first evaluate a whole other command, the loop condition, before deciding whether you trigger an ERR_EXIT for the "while".
Yes, that's quite likely, but you're finding that with code that's
already broken (fails multiple C03traps tests). You can run
make check TESTNUM=C03
make check TESTNUM=E01
to determine whether an experimental change is going to regress a
different variation.
> Here is an observation that could save some complexity. A non-zero exit status either immediately triggers an ERR_EXIT, like in "false" or it doesn't like in "false && true" and instead bubbles up to the first enclosing function
It isn't really helping to repeat the observation that the behavior is
not as specified; getting the internal state to reflect "instead
bubbles up" is exactly the complexity.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author