Ralf Wildenhues wrote: > - with TERM=vt100, on my GNU/Linux system there are still colors > generated by tput, so I did not use that TERM setting,
That is discouraging. The vt100 does not support color and tput should not produce escape sequences for it. I believe that would indicate a bug in the vt100 terminfo on the systems you tested. The 'tput' command (correctly) does not produce color output with TERM=vt100 on my Debian GNU/linux system (nor on HP-UX) so I assume these are on other systems. If you are motivated then a bug report to those systems would be probably be in order so that they can be improved. I am surprised that at this point in history that a vt100 terminal database entry wouldn't be correct! Oh well. > - On virtually no other system that I have access to does color output > work as expected using tput. At least on some they do, when I keep > the TERM setting given by my terminal (xterm), but that does not help > the tests. I am sorry but I am having trouble parsing that sentence. On no other system does it work? Or on no other system does it _not_ work? (HP-UX is my other traditional system and it handles tput as expected.) > - However, ANSI sequences seem to work everywhere I tested. Disclaimer: > I only tested with an xterm over a ssh session and inside a screen > session. But I did test OpenBSD, FreeBSD, Solaris, AIX, Tru64. And on HP-UX too. > Using { ...; } instead of (...) would fix that too, BTW. Oh, yes, of course. (sheepishly realizing I should have thought of that) > - go back to using ANSI escape sequences, I think that means only worry about the TERM=ansi case for the purpose of testing. I think that is fine. > - new test. If `expect' is present, it is used to simulate a terminal > near the end of the test. Otherwise, the test returns SKIP if all > other test commands before that succeeded. Okay. Since expect is optional I think that will be fine. I would hate to make that a hard requirement. In that eventuality I would suggest looking for either expect or script since script can be used to perform this type of test too. Classic Unix systems are probably much more likely to have script available by default than expect. > - macro AM_COLOR_TESTS as lever for the user in both directions: > turn color off even when it would be displayed, and force color on > even when not on a terminal. This is both nice for users of `less -R' > and for actually testing colored output inside a script. Thank you very much for this! It is just what is needed. It makes me quite happy to have a control for this. > I'll wait another couple of days for comments before applying it. I saw your subsequent note that you had applied it and it motivated me to make these comments here that I wanted to make. I think it all looks great. Thanks for doing this. Bob