Re: [PATCH 3/3] t5523: test push progress output to tty
- From
- Jeff King <jrk@wrek.org>
- Date
- Oct 14, 2010, 03:34 UTC
- Message-ID
- <20101014033448.GB28197@sigill.intra.peff.net>
- In-Reply-To
- <20101014031642.GB14664@burratino>
On Wed, Oct 13, 2010 at 10:16:42PM -0500, Jonathan Nieder wrote:
Show 19 quoted lines
> Jeff King wrote: > > > --- a/t/t5523-push-upstream.sh > > +++ b/t/t5523-push-upstream.sh > [...] > > @@ -72,7 +73,14 @@ test_expect_success 'push -u HEAD' ' > > check_config headbranch upstream refs/heads/headbranch > > ' > > > > -test_expect_success 'progress messages to non-tty' ' > > +test_expect_success 'progress messages go to tty' ' > > + ensure_fresh_upstream && > > + > > + test_terminal git push -u upstream master >out 2>err && > > + grep "Writing objects" err > > +' > > Missing TTY prerequisite. (Do you think test_terminal should check > $prereq to prevent this?)
Oops, good catch. I think we should already catch it, as test_terminal will not be defined at all in the no-tty case. We could print a nicer message, but it is not likely to be seen by the user. If they are using "-v", then stderr probably _is_ a tty. And if not, they will not see the message. There are ways around it, but they are not likely to be seen unless the user is really trying (e.g., "./t5523-* -v >not_a_tty").
-Peff