Enhancement

- 'print.empty.columns' now defaults to 'no'.
- Unit tests are updated accordingly.
This commit is contained in:
Scott Kostyshak 2013-02-21 09:53:01 -05:00 committed by Paul Beckingham
parent 0bcb22f8e4
commit 089b3e7d66
6 changed files with 11 additions and 8 deletions

View file

@ -347,9 +347,9 @@ names you have used, or just the ones used in active tasks. The default value i
"no".
.TP
.B print.empty.columns=yes
.B print.empty.columns=no
May be yes or no, and determines whether columns with no data for any task are
printed. Defaults to yes.
printed. Defaults to no.
.TP
.B search.case.sensitive=yes

View file

@ -289,7 +289,7 @@ std::string Config::_defaults =
"complete.all.tags=no # Include old tag names in '_ags' command\n"
"list.all.projects=no # Include old project names in 'projects' command\n"
"list.all.tags=no # Include old tag names in 'tags' command\n"
"print.empty.columns=yes # Print columns which have no data for any task\n"
"print.empty.columns=no # Print columns which have no data for any task\n"
"debug=no # Display diagnostics\n"
"extensions=off # Extension system master switch\n"
"fontunderline=yes # Uses underlines rather than -------\n"

View file

@ -34,6 +34,7 @@ use Test::More tests => 4;
if (open my $fh, '>', '455.rc')
{
print $fh "data.location=.\n";
print $fh "print.empty.columns=yes\n";
close $fh;
ok (-r '455.rc', 'Created 455.rc');

View file

@ -36,6 +36,7 @@ if (open my $fh, '>', 'bug.rc')
print $fh "data.location=.\n";
print $fh "bulk=100\n";
print $fh "confirmation=no\n";
print $fh "print.empty.columns=yes\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}

View file

@ -44,16 +44,16 @@ qx{../src/task rc:bug.rc add sample desc 2>&1};
qx{../src/task rc:bug.rc add withP project:house 2>&1};
my $output = qx{../src/task test sample rc:bug.rc 2>&1};
like ($output, qr/Project/, 'empty \'project\' column is printed by default');
unlike ($output, qr/Project/, 'empty \'project\' column is not printed by default');
$output = qx{../src/task test sample rc.print.empty.columns:no rc:bug.rc 2>&1};
unlike ($output, qr/Project/, 'empty \'project\' column is not printed if rc.print.empty.columns:no');
$output = qx{../src/task test sample rc.print.empty.columns:yes rc:bug.rc 2>&1};
like ($output, qr/Project/, 'empty \'project\' column is printed if rc.print.empty.columns:yes');
$output = qx{../src/task test rc:bug.rc 2>&1};
like ($output, qr/Project/, 'non-empty \'project\' column is printed by default');
$output = qx{../src/task test rc.print.empty.columns:no rc:bug.rc 2>&1};
like ($output, qr/Project/, 'non-empty \'project\' column is printed if rc.print.empty.columns:no');
$output = qx{../src/task test rc.print.empty.columns:yes rc:bug.rc 2>&1};
like ($output, qr/Project/, 'non-empty \'project\' column is printed if rc.print.empty.columns:yes');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc);

View file

@ -35,6 +35,7 @@ if (open my $fh, '>', 'verbose.rc')
{
print $fh "data.location=.\n",
"echo.command=off\n";
print $fh "print.empty.columns=yes\n";
close $fh;
ok (-r 'verbose.rc', 'Created verbose.rc');
}