mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Unit Tests
- The bug.uuid.t test was relying on 'stats' to perform a GC, which is no longer true.
This commit is contained in:
parent
a297756ff0
commit
22e39538c7
3 changed files with 11 additions and 28 deletions
|
@ -10,13 +10,6 @@ PB need to use a UTF-8 friendly way of doing input[--eol].
|
||||||
* dependencies.t
|
* dependencies.t
|
||||||
PB When running "task 1 dep:-2" the '-' is being considerd a binary op.
|
PB When running "task 1 dep:-2" the '-' is being considerd a binary op.
|
||||||
|
|
||||||
* bug.480.t
|
|
||||||
FH A3::is_tag related: +@strange is not seen as a tag
|
|
||||||
|
|
||||||
* confirmation.t
|
|
||||||
FH missing confirmations. CmdModify doesn't call context.config.getBoolean ("confirmation")
|
|
||||||
perhaps do the same as in Command::safety ()
|
|
||||||
|
|
||||||
* merge.duplicate.t
|
* merge.duplicate.t
|
||||||
FH merge fails because of missing undo.data in data dirs.
|
FH merge fails because of missing undo.data in data dirs.
|
||||||
merge ignores URI then outputs wrong (???) msg ?????
|
merge ignores URI then outputs wrong (???) msg ?????
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 9;
|
use Test::More tests => 4;
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'uuid.rc')
|
if (open my $fh, '>', 'uuid.rc')
|
||||||
|
@ -44,11 +44,11 @@ if (open my $fh, '>', 'uuid.rc')
|
||||||
qx{../src/task rc:uuid.rc add simple};
|
qx{../src/task rc:uuid.rc add simple};
|
||||||
qx{../src/task rc:uuid.rc 1 duplicate};
|
qx{../src/task rc:uuid.rc 1 duplicate};
|
||||||
qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday};
|
qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday};
|
||||||
my $output = qx{../src/task rc:uuid.rc stats};
|
qx{../src/task rc:uuid.rc ls};
|
||||||
|
|
||||||
my @all_uuids;
|
my @all_uuids;
|
||||||
my %unique_uuids;
|
my %unique_uuids;
|
||||||
$output = qx{../src/task rc:uuid.rc 1 info};
|
my $output = qx{../src/task rc:uuid.rc 1 info};
|
||||||
my ($uuid) = $output =~ /UUID\s+(\S+)/;
|
my ($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
@ -82,23 +82,13 @@ is (scalar (@all_uuids), 6, '6 tasks created');
|
||||||
is (scalar (keys %unique_uuids), 6, '6 unique UUIDs');
|
is (scalar (keys %unique_uuids), 6, '6 unique UUIDs');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink qw(pending.data completed.data undo.data backlog.data synch.key uuid.rc);
|
||||||
ok (!-r 'pending.data', 'Removed pending.data');
|
ok (! -r 'pending.data' &&
|
||||||
|
! -r 'completed.data' &&
|
||||||
unlink 'completed.data';
|
! -r 'undo.data' &&
|
||||||
ok (!-r 'completed.data', 'Removed completed.data');
|
! -r 'backlog.data' &&
|
||||||
|
! -r 'synch.key' &&
|
||||||
unlink 'undo.data';
|
! -r 'uuid.rc', 'Cleanup');
|
||||||
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 'uuid.rc';
|
|
||||||
ok (!-r 'uuid.rc', 'Removed uuid.rc');
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ like ($output, qr/No matches./, 'No matches');
|
||||||
ok (-r 'completed.data', 'completed.data created');
|
ok (-r 'completed.data', 'completed.data created');
|
||||||
|
|
||||||
$output = qx{../src/task rc:delete.rc info 1};
|
$output = qx{../src/task rc:delete.rc info 1};
|
||||||
like ($output, qr/No matches\./, 'No matches');
|
like ($output, qr/No matches\./, 'No matches'); # 10
|
||||||
|
|
||||||
# Add a task, delete it, and modify on the fly.
|
# Add a task, delete it, and modify on the fly.
|
||||||
qx{../src/task rc:delete.rc add one two};
|
qx{../src/task rc:delete.rc add one two};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue