Unit Tests

- Improved the signal-to-noise ratio for the args tests.
This commit is contained in:
Paul Beckingham 2011-09-06 23:22:16 -04:00
parent 0da3e12e36
commit 646117c213
6 changed files with 48 additions and 108 deletions

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, '>', 'args.rc')
@ -61,23 +61,13 @@ $output = qx{../src/task rc:args.rc info 1};
like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo');
# 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 'args.rc';
ok (!-r 'args.rc', 'Removed args.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key args.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch_key.data' &&
! -r 'args.rc', 'Cleanup');
exit 0;