mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement
- 'print.empty.columns' now defaults to 'no'. - Unit tests are updated accordingly.
This commit is contained in:
parent
0bcb22f8e4
commit
089b3e7d66
6 changed files with 11 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue