Subject: bug#62406: “! failing-command” pattern in shell tests is wrong

From: Ludovic Courtès <[email-masked]>
Date: Tue, 28 Mar 2023 18:21:12 +0200

Hi Eric,

Eric Bavier <[email-masked]> skribis:

> The purpose of d89343 was to ease visual parsing of the tests.  I mentioned
> having used the '!' syntax in my own shell tests, but I realize now that I
> was not relying on `set -e` like guix is.
>
> I'll consider a few options.

Neat.  I guess we could have a ‘lib.sh’ with an ‘expect_fail’ function
or something.

> Do we have a known issue where this is causing a test to not to catch
> a failure?

No; I noticed it while writing a new test that I expected to fail.

Thanks for your feedback!  Shell semantics are definitely weird.  :-)

Ludo’.