Thread (39 messages) flat view 39 messages, 6 authors, 2016-06-15

Re: [PATCH v2 5/8] test_terminal: give priority to test-terminal.perl usage

From: Jeff King <hidden>
Date: 2016-06-15 22:49:51

On Sun, Oct 17, 2010 at 02:37:00AM +0800, Tay Ray Chuan wrote:
The outcome depends on whether stdout was already a terminal (in which
case test_terminal is a noop) or not (in which case test_terminal
introduces a pseudo-tty in the middle of the pipeline).

	$ test_terminal.perl sh -c 'test -t 1 && echo >&2 YES' >out
	YES
	$ sh -c 'test -t 1 && echo >&2 YES' >out
	$

How about this?

 - use the test_terminal script even when running with "-v"
   if IO::Pty is available, to allow commands like

	test_terminal foo >out 2>err

 - add a separate TTYREDIR prerequisite which is only set
   when the test_terminal script is usable
Is it even worth keeping the direct-to-tty code at all? Yes, it means
that people without IO::Pty can use _some_ terminal tests with "-v". But
it creates a headache for test writers in understanding the subtle
difference between TTY and TTYREDIR.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help