mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Improved signal to noise ratio for op_*.t tests. - Updated ANALYSIS file.
This commit is contained in:
parent
1994240899
commit
d9fa6fbac8
8 changed files with 56 additions and 129 deletions
|
@ -18,6 +18,3 @@ FH merge fails because of missing undo.data in data dirs.
|
|||
FH 'task info' shows tasks from the completed.data file when doing a filter on the ID
|
||||
could it be confused and interpretes this as an UUID
|
||||
|
||||
* bug.concat.t
|
||||
PB The word 'original' is parsed as 'or'(operator) ' '(space) 'iginal'(word).
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 31;
|
||||
use Test::More tests => 26;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -83,23 +83,13 @@ unlike ($output, qr/three/, 'ls project:A priority:H --> !three');
|
|||
unlike ($output, qr/four/, 'ls project:A priority:H --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
26
test/op_gt.t
26
test/op_gt.t
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 27;
|
||||
use Test::More tests => 22;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -77,23 +77,13 @@ like ($output, qr/three/, 'ls description > t --> three');
|
|||
unlike ($output, qr/four/, 'ls description > t --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 15;
|
||||
use Test::More tests => 10;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -59,23 +59,13 @@ like ($output, qr/three/, 'ls description >= t --> three');
|
|||
unlike ($output, qr/four/, 'ls description >= t --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
26
test/op_lt.t
26
test/op_lt.t
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 27;
|
||||
use Test::More tests => 22;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -77,23 +77,13 @@ unlike ($output, qr/three/, 'ls description < t --> !three');
|
|||
like ($output, qr/four/, 'ls description < t --> four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 15;
|
||||
use Test::More tests => 10;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -59,23 +59,13 @@ unlike ($output, qr/three/, 'ls description <= t --> !three');
|
|||
like ($output, qr/four/, 'ls description <= t --> four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
26
test/op_or.t
26
test/op_or.t
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 23;
|
||||
use Test::More tests => 18;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -71,23 +71,13 @@ like ($output, qr/three/, 'ls project=A or priority=H --> three');
|
|||
unlike ($output, qr/four/, 'ls project=A or priority=H --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 23;
|
||||
use Test::More tests => 18;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -71,23 +71,13 @@ like ($output, qr/three/, 'ls project=A priority=H --> three');
|
|||
unlike ($output, qr/four/, 'ls project=A priority=H --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
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 'op.rc';
|
||||
ok (!-r 'op.rc', 'Removed op.rc');
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'synch.key' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue