From eae398f203eed44adcd47c39c4f67a166abbcf50 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 May 2014 23:05:55 -0400 Subject: [PATCH] Unit Tests - Converted test to use a better value than a hard-coded date. - Removed useless setup/teardown tests. --- test/color.due.t | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/color.due.t b/test/color.due.t index 719137a33..1b6b74b4b 100755 --- a/test/color.due.t +++ b/test/color.due.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -41,11 +41,10 @@ if (open my $fh, '>', 'color.rc') "_forcecolor=1\n", "dateformat=m/d/Y\n"; close $fh; - ok (-r 'color.rc', 'Created color.rc'); } # Test the add command. -qx{../src/task rc:color.rc add due:12/31/2037 nothing 2>&1}; +qx{../src/task rc:color.rc add due:someday nothing 2>&1}; qx{../src/task rc:color.rc add due:tomorrow red 2>&1}; my $output = qx{../src/task rc:color.rc list 2>&1}; @@ -54,11 +53,5 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data color.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'color.rc', 'Cleanup'); - exit 0;