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

@ -36,9 +36,14 @@
#include "Config.h"
////////////////////////////////////////////////////////////////////////////////
// These are default (but overridable) reports. These entries are necessary
// because these three reports were converted from hard-coded reports to custom
// reports, and therefore need these config file entries. However, users are
// already used to seeing these three reports, but do not have these entries.
// The choice was a) make users edit their .taskrc files, b) write a .taskrc
// upgrade program to make the change, or c) this.
Config::Config ()
{
// These are default (but overridable) reports.
(*this)["report.long.columns"] = "id,project,priority,entry,start,due,age,tags,description";
(*this)["report.long.sort"] = "due+,priority-,project+";
(*this)["report.list.columns"] = "id,project,priority,due,active,age,description";