mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Removed useless setup/teardown tests, improving the signal to noise ratio.
This commit is contained in:
parent
a59f8644f1
commit
7ab8d4db6d
7 changed files with 7 additions and 56 deletions
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 26;
|
||||
use Test::More tests => 24;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -87,11 +86,5 @@ unlike ($output, qr/four/, 'ls project:A priority:H --> !four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 26;
|
||||
use Test::More tests => 24;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -87,11 +86,5 @@ unlike ($output, qr/four/, 'ls urgency > 10 --> !four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 12;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -69,11 +68,5 @@ unlike ($output, qr/four/, 'ls urgency >= 2.0 --> !four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 26;
|
||||
use Test::More tests => 24;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -87,11 +86,5 @@ like ($output, qr/four/, 'ls description < 10 --> four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 12;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -69,11 +68,5 @@ like ($output, qr/four/, 'ls urgency <= 2.0 --> four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 18;
|
||||
use Test::More tests => 16;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -75,11 +74,5 @@ unlike ($output, qr/four/, 'ls project=A or priority=H --> !four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 18;
|
||||
use Test::More tests => 16;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'op.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'op.rc', 'Created op.rc');
|
||||
}
|
||||
|
||||
# Setup: Add a task
|
||||
|
@ -75,11 +74,5 @@ unlike ($output, qr/four/, 'ls project=A priority=H --> !four');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'op.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue