From bdad6642c8b192306a54a7b5b83034dafb8ec521 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 1 Jun 2014 09:56:14 -0400 Subject: [PATCH] Unit Tests - Removed useless setup/teardown tests, improving the signal to noise ratio. --- test/cal.t | 9 +-------- test/caseless.t | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/test/cal.t b/test/cal.t index b99a1a26e..cc08736a4 100755 --- a/test/cal.t +++ b/test/cal.t @@ -29,7 +29,7 @@ use strict; use warnings; -use Test::More tests => 84; +use Test::More tests => 82; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -49,7 +49,6 @@ if (open my $fh, '>', 'cal.rc') "confirmation=off\n", "bulk=10\n"; close $fh; - ok (-r 'cal.rc', 'Created cal.rc'); } my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @@ -263,10 +262,4 @@ like ($output, qr/30;103m25/, 'Holiday åäö is color-coded'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data details.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'details.rc', 'Cleanup'); - exit 0; diff --git a/test/caseless.t b/test/caseless.t index 24a7e3ea4..8d40f885f 100755 --- a/test/caseless.t +++ b/test/caseless.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More tests => 16; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -43,7 +43,6 @@ if (open my $fh, '>', 'caseless.rc') "report.ls.filter=status:pending\n"; close $fh; - ok (-r 'caseless.rc', 'Created caseless.rc'); } # Attempt case-sensitive and case-insensitive substitutions and filters. @@ -128,11 +127,5 @@ like ($output, qr/four five six/, 'one two three\nfour five six -> ls descriptio # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data caseless.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'caseless.rc', 'Cleanup'); - exit 0;