Re: [PATCH 2/3] t7005: sanitize test environment for subsequent tests
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 10, 2025, 20:58 UTC
- Message-ID
- <CAPig+cQug9-vH5SHHuM6xa-We51td0=JigODjvise0v8XA+eEw@mail.gmail.com>
- In-Reply-To
- <9B179FBA-6695-4F8A-8EE1-A02F1236805E@gmail.com>
On Sun, Aug 10, 2025 at 3:54 PM Ben Knoble <ben.knoble@gmail.com> wrote:
Show 8 quoted lines
> > Le 10 août 2025 à 15:44, Phillip Wood <phillip.wood123@gmail.com> a écrit : > >> + git show -s --pretty=oneline >show && > >> + <show sed -e "s/^[0-9a-f]* //" >actual && > >> + test_cmp expect actual > > > > We need to add "|| return 1" to the last line here and in the test below to reliably error out when test_cmp fails. I'd have thought that our test linting should hove picked this up but maybe it is confused by the subshell > > PS I think it’a actually “exit 1” in this case?
Indeed, it should be `|| exit 1` since this is inside a subshell.
(I was just about to respond to Phillip's email but continued reading the thread and saw that you correctly mentioned `|| exit 1` already. Thanks.)