mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Upgraded to use the new template.
This commit is contained in:
parent
f7deb37174
commit
e1908b6714
1 changed files with 11 additions and 7 deletions
|
@ -33,20 +33,24 @@ use Test::More tests => 2;
|
|||
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, '>', 'bug.rc')
|
||||
if (open my $fh, '>', $rc)
|
||||
{
|
||||
print $fh "data.location=.\n";
|
||||
close $fh;
|
||||
}
|
||||
|
||||
# Bug #489 - tags.none: is not filtering tagless tasks
|
||||
qx{../src/task rc:bug.rc add with +tag 2>&1};
|
||||
qx{../src/task rc:bug.rc add without 2>&1};
|
||||
my $output = qx{../src/task rc:bug.rc list tags.none: 2>&1};
|
||||
unlike ($output, qr/with /, 'tags.none: skips tagged');
|
||||
like ($output, qr/without/, 'tags.none: finds tagless');
|
||||
qx{../src/task rc:$rc add with +tag 2>&1};
|
||||
qx{../src/task rc:$rc add without 2>&1};
|
||||
my $output = qx{../src/task rc:$rc list tags.none: 2>&1};
|
||||
unlike ($output, qr/with /, "$ut: tags.none: skips tagged");
|
||||
like ($output, qr/without/, "$ut: tags.none: finds tagless");
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data bug.rc);
|
||||
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
|
||||
exit 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue