- Added feature #827, which allows augmentation of default.command with extra
  arguments, when default.command itself contains mulitple arguments (thanks to
  Aikido Guy).
- Fixed bug #846, which prevented the default.command configuration from
  handling multiple arguments (thanks to Uli Martens).
This commit is contained in:
Paul Beckingham
2011-09-25 11:37:57 -04:00
parent 4a87ab74f4
commit 4858931592
3 changed files with 27 additions and 21 deletions

View File

@@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 24;
use Test::More tests => 21;
# Create the rc file.
if (open my $fh, '>', 'default.rc')
@@ -77,24 +77,20 @@ like ($output, qr/\//, 'default due added');
$output = qx{../src/task rc:default.rc};
like ($output, qr/1 PROJECT L .+ priority specified/, 'default command worked');
qx{../src/task rc:default.rc add project:HOME priority:M due:tomorrow all specified};
qx{echo '-- y' | ../src/task rc:default.rc config default.command 'list priority:M'};
$output = qx{../src/task rc:default.rc};
like ($output, qr/ M /, 'priority:M included in default command');
unlike ($output, qr/ L /, 'priority:L excluded from default command');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');
unlink 'completed.data';
ok (!-r 'completed.data', 'Removed completed.data');
unlink 'undo.data';
ok (!-r 'undo.data', 'Removed undo.data');
unlink 'backlog.data';
ok (!-r 'backlog.data', 'Removed backlog.data');
unlink 'synch.key';
ok (!-r 'synch.key', 'Removed synch.key');
unlink 'default.rc';
ok (!-r 'default.rc', 'Removed default.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key default.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch.key' &&
! -r 'default.rc', 'Cleanup');
exit 0;