Unit Tests

- Improved signal to noise ratio, which in this case helps with testing.
This commit is contained in:
Paul Beckingham 2011-09-11 01:03:51 -04:00
parent 038687b801
commit b0abe5a5ba

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 12;
use Test::More tests => 7;
# Create the rc file.
if (open my $fh, '>', 'recur.rc')
@ -53,23 +53,13 @@ $output = qx{../src/task rc:recur.rc list};
like ($output, qr/and has been deleted/, 'Parent task deleted');
# 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 'recur.rc';
ok (!-r 'recur.rc', 'Removed recur.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key recur.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch.key' &&
! -r 'recur.rc', 'Cleanup');
exit 0;