Unit Tests

- Minor bug fixes.
This commit is contained in:
Paul Beckingham
2011-09-05 01:48:25 -04:00
parent e2d0126415
commit d1bc46c355
4 changed files with 34 additions and 54 deletions

View File

@@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 9;
use Test::More tests => 4;
# Create the rc file.
if (open my $fh, '>', 'color.rc')
@@ -51,23 +51,13 @@ like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.blocked');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');
unlink 'completed.data';
ok (!-r 'completed.data', 'Removed completed.data');
unlink 'backlog.data';
ok (!-r 'backlog.data', 'Removed backlog.data');
unlink 'synch.key';
ok (!-r 'synch.key', 'Removed synch.key');
unlink 'undo.data';
ok (!-r 'undo.data', 'Removed undo.data');
unlink 'color.rc';
ok (!-r 'color.rc', 'Removed color.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch_key.data' &&
! -r 'color.rc', 'Cleanup');
exit 0;