On Sat, Feb 20, 2010 at 08:09:22PM -0600, Jonathan Nieder wrote: > Testing pagination requires (fake or real) access to a terminal so we > can see whether the pagination automatically kicks in, which makes it > hard to get good coverage when running tests without --verbose. There > are a number of ways to work around that: > > - Replace all isatty calls with calls to a custom xisatty wrapper > that usually checks for a terminal but can be overridden for tests. > This would be workable, but it would require implementing xisatty > separately in three languages (C, shell, and perl) and making sure > that any code that is to be tested always uses the wrapper. > > - Redirect stdout to /dev/tty. This would be problematic because > there might be no terminal available, and even if a terminal is > available, it might not be appropriate to spew output to it. > > - Create a new pseudo-terminal on the fly and capture its output. > > This patch implements the third approach. Just to wrap up my end of this patch discussion, I think the approach you take here is the sanest one. While it would be nice to get test coverage on every system, I don't think it is worth the effort of trying to write portable terminal creation code. And this way at least the code in git is fairly minimal. So looks good to me. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html