Re: [PATCH v9 3/8] t2400: refactor "worktree add" opt exclusion tests
- From
Jacob Abel <jacobabel@nullpo.dev>
- Date
- Apr 20, 2023, 02:46 UTC
- Message-ID
- <dsbjgeppeusvddeqn466xwnaa6eif4uoofbcju4sdzhotp5ctq@hh6unkszo5k3>
- In-Reply-To
- <xmqqmt36jixr.fsf@gitster.g>
On 23/04/17 02:30PM, Junio C Hamano wrote:
Show 24 quoted lines
> Jacob Abel <jacobabel@nullpo.dev> writes: > > [...] > > > [....] > > Again, I do not think this sends output to the standard output at > the end of this test piece. > > > + test_must_fail git worktree add $opts 2>actual && > > + grep -E "fatal:( options)? .* cannot be used together" actual > > + ' > > +} > > I do not think this patch is needed (I'd rather see people learn the > trick of running with "-i" and rely on the fact that the trash > directory is left intact to be inspected), but if you must, it may > make more sense to add test_must_contain to make a failed 'grep > "$@"' easier to see, similar to the way that test_must_be_empty > helps a failing 'test ! -s "$1"', something along the lines of ... > > [...] > > Thanks.
Understood. As mentioned in the discussion for patch 2/8, these changes (trying to `cat actual` on `test_cleanup`) will be reverted for the next revision across all patches.