Unit Tests - color.disable color.pri config.obsolete

- Added unit tests to cover automatic colorization by priority.
- Added unit tests to cover automatic disabling of color when !isatty.
- Added unit tests to cover display of unsupported configuration
  variable in the 'version' report.
- Added support the '_forcecolor' configuration variable to allow the
  possibility of unit tests that test color support, yet redirect
  output to a file.  This configuration variable will not be
  documented.
This commit is contained in:
Paul Beckingham
2009-03-07 00:14:58 -05:00
parent 3b1d396e0a
commit 6a7c66aa05
10 changed files with 231 additions and 34 deletions

View File

@@ -290,7 +290,9 @@ int main (int argc, char** argv)
if (!isatty (fileno (stdout)))
{
conf.set ("curses", "off");
conf.set ("color", "off");
if (! conf.get (std::string ("_forcecolor"), false))
conf.set ("color", "off");
}
TDB tdb;