Unit Tests

- Fixed minor unit test problems.
This commit is contained in:
Paul Beckingham
2011-09-05 01:27:57 -04:00
parent 751e8e7f90
commit e2d0126415
4 changed files with 39 additions and 77 deletions

View File

@@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 11;
use Test::More tests => 6;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
@@ -65,23 +65,13 @@ $output = qx{../src/task rc:bug.rc $id modify due:};
unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task');
# 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 'bug.rc';
ok (!-r 'bug.rc', 'Removed bug.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch_key.data' &&
! -r 'bug.rc', 'Cleanup');
exit 0;