mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- Removed unnecessary include.
This commit is contained in:
parent
d261a38d17
commit
a078ad41e8
2 changed files with 26 additions and 23 deletions
|
@ -35,7 +35,6 @@
|
||||||
#ifdef PRODUCT_TASKWARRIOR
|
#ifdef PRODUCT_TASKWARRIOR
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <Nibbler.h>
|
#include <Nibbler.h>
|
||||||
#include <Tree.h>
|
|
||||||
#endif
|
#endif
|
||||||
#include <Date.h>
|
#include <Date.h>
|
||||||
#include <Duration.h>
|
#include <Duration.h>
|
||||||
|
|
|
@ -33,8 +33,12 @@ use Test::More tests => 5;
|
||||||
delete $ENV{'TASKDATA'};
|
delete $ENV{'TASKDATA'};
|
||||||
delete $ENV{'TASKRC'};
|
delete $ENV{'TASKRC'};
|
||||||
|
|
||||||
|
use File::Basename;
|
||||||
|
my $ut = basename ($0);
|
||||||
|
my $rc = $ut . '.rc';
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'args.rc')
|
if (open my $fh, '>', $rc)
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"confirmation=off\n";
|
"confirmation=off\n";
|
||||||
|
@ -42,33 +46,33 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test 'done' with en-passant changes.
|
# Test 'done' with en-passant changes.
|
||||||
qx{../src/task rc:args.rc add one 2>&1};
|
qx{../src/task rc:$rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two 2>&1};
|
qx{../src/task rc:$rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three 2>&1};
|
qx{../src/task rc:$rc add three 2>&1};
|
||||||
qx{../src/task rc:args.rc add four 2>&1};
|
qx{../src/task rc:$rc add four 2>&1};
|
||||||
qx{../src/task rc:args.rc add five 2>&1};
|
qx{../src/task rc:$rc add five 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 done oneanno 2>&1};
|
qx{../src/task rc:$rc 1 done oneanno 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
|
my $output = qx{../src/task rc:$rc 1 info 2>&1};
|
||||||
like ($output, qr/oneanno/, 'done enpassant anno');
|
like ($output, qr/oneanno/, "$ut: done enpassant anno");
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 2 done /two/TWO/ 2>&1};
|
qx{../src/task rc:$rc 2 done /two/TWO/ 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 2 info 2>&1};
|
$output = qx{../src/task rc:$rc 2 info 2>&1};
|
||||||
like ($output, qr/Description\s+TWO/, 'done enpassant subst');
|
like ($output, qr/Description\s+TWO/, "$ut: done enpassant subst");
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 3 done +threetag 2>&1};
|
qx{../src/task rc:$rc 3 done +threetag 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 3 info 2>&1};
|
$output = qx{../src/task rc:$rc 3 info 2>&1};
|
||||||
like ($output, qr/Tags\s+threetag/, 'done enpassant tag');
|
like ($output, qr/Tags\s+threetag/, "$ut: done enpassant tag");
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 4 done pri:H 2>&1};
|
qx{../src/task rc:$rc 4 done pri:H 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 4 info 2>&1};
|
$output = qx{../src/task rc:$rc 4 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, 'done enpassant priority');
|
like ($output, qr/Priority\s+H/, "$ut: done enpassant priority");
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 5 done pro:A 2>&1};
|
qx{../src/task rc:$rc 5 done pro:A 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 5 info 2>&1};
|
$output = qx{../src/task rc:$rc 5 info 2>&1};
|
||||||
like ($output, qr/Project\s+A/, 'done enpassant project');
|
like ($output, qr/Project\s+A/, "$ut: done enpassant project");
|
||||||
|
|
||||||
# Cleanup.
|
# 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;
|
exit 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue