From 5a07dce93aed9fec7c65cea1350f99c1287ce471 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 7 Sep 2011 00:42:38 -0400 Subject: [PATCH] Unit Tests - Improved the signal to noise ratio. --- test/substitute.t | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/test/substitute.t b/test/substitute.t index f833a5a9d..c3c4eabeb 100755 --- a/test/substitute.t +++ b/test/substitute.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'subst.rc') @@ -75,23 +75,13 @@ $output = qx{../src/task rc:subst.rc info 1}; like ($output, qr/aaa CcC/, 'regex'); # 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 'subst.rc'; -ok (!-r 'subst.rc', 'Removed subst.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key subst.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'subst.rc', 'Cleanup'); exit 0;