[PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-08 Thread SZEDER Gábor
To check that a git command fails and to inspect its error message we usually execute a command like this throughout our test suite: test_must_fail git command --option 2>output.err Note that this command doesn't limit the redirection to the git command, but it redirects the standard error of t

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-08 Thread Eric Sunshine
On Thu, Feb 8, 2018 at 9:42 PM, SZEDER Gábor wrote: > To check that a git command fails and to inspect its error message we > usually execute a command like this throughout our test suite: > > test_must_fail git command --option 2>output.err > > Note that this command doesn't limit the redirecti

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-09 Thread Jeff King
On Fri, Feb 09, 2018 at 03:42:34AM +0100, SZEDER Gábor wrote: > To check that a git command fails and to inspect its error message we > usually execute a command like this throughout our test suite: > > test_must_fail git command --option 2>output.err > > Note that this command doesn't limit t

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-09 Thread Junio C Hamano
Jeff King writes: > 2. The "-x" problems aren't specific to test_must_fail at all. They're > a general issue with shell functions. > > I'm not entirely happy with saying "if you want to use -x, please use > bash". But given that it actually solves the problems everywhere with no > further

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-09 Thread Jeff King
On Fri, Feb 09, 2018 at 10:36:19AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > 2. The "-x" problems aren't specific to test_must_fail at all. They're > > a general issue with shell functions. > > > > I'm not entirely happy with saying "if you want to use -x, please use > > bash

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-09 Thread Jeff King
On Fri, Feb 09, 2018 at 01:57:10PM -0500, Jeff King wrote: > Here's what it looks like as a patch. > > -- >8 -- > Subject: [PATCH] t: send verbose test-helper output to fd 4 That applies on 'master'. If we go this route, we'd want this on sg/test-i18ngrep, which is in 'next' right now: -- >8 --

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-23 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 3:21 PM, Jeff King wrote: > On Fri, Feb 09, 2018 at 03:42:34AM +0100, SZEDER Gábor wrote: > >> To check that a git command fails and to inspect its error message we >> usually execute a command like this throughout our test suite: >> >> test_must_fail git command --option