mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Deletion
- An already-completed task may now also be deleted. - Added unit tests.
This commit is contained in:
parent
fce2469f41
commit
e5303a2180
3 changed files with 19 additions and 16 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 16;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'delete.rc')
|
||||
|
@ -70,6 +70,16 @@ $output = qx{../src/task rc:delete.rc 1 info};
|
|||
like ($output, qr/foo/, 'Deletion annotation successful');
|
||||
like ($output, qr/H/, 'Deletion modification successful');
|
||||
|
||||
# Add a task, complete it, then delete it.
|
||||
qx{../src/task rc:delete.rc add three};
|
||||
$output = qx{../src/task rc:delete.rc 2 info};
|
||||
like ($output, qr/three/, 'added and verified new task');
|
||||
my ($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||
qx{../src/task rc:delete.rc 2 done};
|
||||
qx{../src/task rc:delete.rc $uuid delete};
|
||||
$output = qx{../src/task rc:delete.rc $uuid info};
|
||||
like ($output, qr/Deleted/, 'task added, completed, then deleted');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key delete.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue