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
77d93ef631
commit
c0f4baa8d9
6 changed files with 6 additions and 48 deletions
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 8;
|
||||
use Test::More tests => 6;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=off\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test id before command, and id after command.
|
||||
|
@ -60,11 +59,5 @@ unlike ($output, qr/^Completed 1 task.$/ms, 'ID after COMMAND');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=off\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test 'done' with en-passant changes.
|
||||
|
@ -71,11 +70,5 @@ like ($output, qr/Project\s+A/, 'done enpassant project');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=off\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test 'delete' with en-passant changes.
|
||||
|
@ -71,11 +70,5 @@ like ($output, qr/Project\s+A/, 'delete enpassant project');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=off\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test 'start' with en-passant changes.
|
||||
|
@ -71,11 +70,5 @@ like ($output, qr/Project\s+A/, 'start enpassant project');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=off\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test 'stop' with en-passant changes.
|
||||
|
@ -77,11 +76,5 @@ like ($output, qr/Project\s+A/, 'stop enpassant project');
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 5;
|
||||
|
||||
# Ensure environment has no influence.
|
||||
delete $ENV{'TASKDATA'};
|
||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'args.rc')
|
|||
print $fh "data.location=.\n",
|
||||
"confirmation=no\n";
|
||||
close $fh;
|
||||
ok (-r 'args.rc', 'Created args.rc');
|
||||
}
|
||||
|
||||
# Test the -- argument.
|
||||
|
@ -65,11 +64,5 @@ like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modif
|
|||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data args.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
! -r 'completed.data' &&
|
||||
! -r 'undo.data' &&
|
||||
! -r 'backlog.data' &&
|
||||
! -r 'args.rc', 'Cleanup');
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue