[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: colorful tests
From: |
Benoit Sigoure |
Subject: |
Re: colorful tests |
Date: |
Mon, 5 Nov 2007 18:08:34 +0100 |
On Nov 5, 2007, at 5:01 PM, Bob Proulx wrote:
Benoit Sigoure wrote:
Bob Proulx wrote:
For example when capturing output with 'script' all of those
escape sequences get in the way.
If you do this, it will DWYM unless you have a broken implementation
of `test -t' (which should be reported so we can mention it in the
"limitation of builtins" section of the Autoconf manual).
I don't understand your do-what-you-mean comment. As I read it it
appears that you are implying that 'script' sessions are not attached
to ttys and that 'test -t' should return false. But actually they are
attached to ttys and 'test -t' will return true.
'script' is a typical way to save all I/O to and from a terminal to a
file (usually named "typescript") and that includes any escape
sequences that were generated in the output. Since the input and
output are a tty devices 'test -t' will return true and also the TERM
would be "xterm" or other color capable terminal and therefore color
escape sequences would be generated and would be saved to the file.
Oh sorry, for some reason I did not make the connection with the
'script' command. In this case indeed it will still output colors.
I misunderstood and thought you were talking about problems when
scripting the testsuite, like, say you redirect its output to some
log you want to look at afterwards (which will work since test -t 1
in this case will be false).
Sorry for the noise ;o
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part
Re: colorful tests, Bob Proulx, 2007/11/05