- Removed unnecessary include.
This commit is contained in:
Paul Beckingham 2014-11-01 21:53:58 -04:00
parent d261a38d17
commit a078ad41e8
2 changed files with 26 additions and 23 deletions

View file

@ -35,7 +35,6 @@
#ifdef PRODUCT_TASKWARRIOR
#include <Context.h>
#include <Nibbler.h>
#include <Tree.h>
#endif
#include <Date.h>
#include <Duration.h>

View file

@ -33,8 +33,12 @@ use Test::More tests => 5;
delete $ENV{'TASKDATA'};
delete $ENV{'TASKRC'};
use File::Basename;
my $ut = basename ($0);
my $rc = $ut . '.rc';
# Create the rc file.
if (open my $fh, '>', 'args.rc')
if (open my $fh, '>', $rc)
{
print $fh "data.location=.\n",
"confirmation=off\n";
@ -42,33 +46,33 @@ if (open my $fh, '>', 'args.rc')
}
# Test 'done' with en-passant changes.
qx{../src/task rc:args.rc add one 2>&1};
qx{../src/task rc:args.rc add two 2>&1};
qx{../src/task rc:args.rc add three 2>&1};
qx{../src/task rc:args.rc add four 2>&1};
qx{../src/task rc:args.rc add five 2>&1};
qx{../src/task rc:$rc add one 2>&1};
qx{../src/task rc:$rc add two 2>&1};
qx{../src/task rc:$rc add three 2>&1};
qx{../src/task rc:$rc add four 2>&1};
qx{../src/task rc:$rc add five 2>&1};
qx{../src/task rc:args.rc 1 done oneanno 2>&1};
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
like ($output, qr/oneanno/, 'done enpassant anno');
qx{../src/task rc:$rc 1 done oneanno 2>&1};
my $output = qx{../src/task rc:$rc 1 info 2>&1};
like ($output, qr/oneanno/, "$ut: done enpassant anno");
qx{../src/task rc:args.rc 2 done /two/TWO/ 2>&1};
$output = qx{../src/task rc:args.rc 2 info 2>&1};
like ($output, qr/Description\s+TWO/, 'done enpassant subst');
qx{../src/task rc:$rc 2 done /two/TWO/ 2>&1};
$output = qx{../src/task rc:$rc 2 info 2>&1};
like ($output, qr/Description\s+TWO/, "$ut: done enpassant subst");
qx{../src/task rc:args.rc 3 done +threetag 2>&1};
$output = qx{../src/task rc:args.rc 3 info 2>&1};
like ($output, qr/Tags\s+threetag/, 'done enpassant tag');
qx{../src/task rc:$rc 3 done +threetag 2>&1};
$output = qx{../src/task rc:$rc 3 info 2>&1};
like ($output, qr/Tags\s+threetag/, "$ut: done enpassant tag");
qx{../src/task rc:args.rc 4 done pri:H 2>&1};
$output = qx{../src/task rc:args.rc 4 info 2>&1};
like ($output, qr/Priority\s+H/, 'done enpassant priority');
qx{../src/task rc:$rc 4 done pri:H 2>&1};
$output = qx{../src/task rc:$rc 4 info 2>&1};
like ($output, qr/Priority\s+H/, "$ut: done enpassant priority");
qx{../src/task rc:args.rc 5 done pro:A 2>&1};
$output = qx{../src/task rc:args.rc 5 info 2>&1};
like ($output, qr/Project\s+A/, 'done enpassant project');
qx{../src/task rc:$rc 5 done pro:A 2>&1};
$output = qx{../src/task rc:$rc 5 info 2>&1};
like ($output, qr/Project\s+A/, "$ut: done enpassant project");
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
exit 0;