From: Kristoffer Haugsbakk Date: Tue, 30 Dec 2025 14:33:31 GMT Subject: Re: [PATCH 2/2] t3650: add more regression tests for failure conditions Message-ID: <105d610f-f002-4ae5-96a6-f83595aba19d@app.fastmail.com> In-Reply-To: <65d19cff-33cd-4209-af3d-6a518254019a@gmail.com> On Tue, Dec 23, 2025, at 11:58, Phillip Wood wrote: >>[snip] >> +test_expect_success 'option --onto or --advance is mandatory' ' >> + cat >expect <<-\EOF && >> + error: option --onto or --advance is mandatory >> + EOF >> + # First line is the error; rest is Usage >> + test_must_fail git replay topic1..topic2 >&1 2>&1 | >> + head -1 >actual && > > Using a pipe means we lose the return value of test_must_fail here so > the test wont fail if the command succeeds. Everything else looks good Thanks. That’s kind of subtle for me. I’ll fix. I’ll just test for the full output instead of the first line.