mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
New command config
- version now only displays the version number and copyright notice - config displays the task configuration that version used to show - configuration variable longversion is not longer needed
This commit is contained in:
parent
48daf13d7f
commit
dca4772f33
11 changed files with 74 additions and 50 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'color.rc')
|
||||
|
@ -41,9 +41,8 @@ if (open my $fh, '>', 'color.rc')
|
|||
}
|
||||
|
||||
# Test the add command.
|
||||
my $output = qx{../task rc:color.rc rc.longversion:off version};
|
||||
like ($output, qr/color\.pri\.M/ms, 'Deprecated color detected');
|
||||
unlike ($output, qr/color\.pri\.H/ms, 'Non-deprecated color ignored');
|
||||
my $output = qx{../task rc:color.rc config};
|
||||
like ($output, qr/that use deprecated underscores/ms, 'Deprecated color detected');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
|
|
|
@ -41,7 +41,7 @@ if (open my $fh, '>', 'duplicate.rc')
|
|||
}
|
||||
|
||||
# Test the add command.
|
||||
my $output = qx{../task rc:duplicate.rc rc.longversion:off version};
|
||||
my $output = qx{../task rc:duplicate.rc config};
|
||||
like ($output, qr/data\.location/ms, 'Duplicate entry detected');
|
||||
unlike ($output, qr/colorl/ms, 'Single entry not ignored');
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ if (open my $fh, '>', 'obsolete.rc')
|
|||
}
|
||||
|
||||
# Test the add command.
|
||||
my $output = qx{../task rc:obsolete.rc version};
|
||||
my $output = qx{../task rc:obsolete.rc config};
|
||||
|
||||
like ($output, qr/Your .taskrc file contains these unrecognized variables:\n/,
|
||||
'unsupported configuration variable');
|
||||
|
|
|
@ -39,10 +39,10 @@ if (open my $fh, '>', 'rc.rc')
|
|||
ok (-r 'rc.rc', 'Created rc.rc');
|
||||
}
|
||||
|
||||
my $output = qx{../task rc:rc.rc version};
|
||||
my $output = qx{../task rc:rc.rc config};
|
||||
like ($output, qr/\sfoo\s+bar/, 'unmodified');
|
||||
|
||||
$output = qx{../task rc:rc.rc rc.foo:baz version};
|
||||
$output = qx{../task rc:rc.rc rc.foo:baz config};
|
||||
like ($output, qr/\sfoo\s+baz/, 'overridden');
|
||||
|
||||
unlink 'rc.rc';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue