From e077b5bd34a53e9050f0eb54315f948ca3c29f5a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Aug 2014 21:22:04 -0400 Subject: [PATCH] Unit Tests - Upgraded to use the new template. --- test/bug.839.t | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/bug.839.t b/test/bug.839.t index 2efaa10b0..8964bd534 100755 --- a/test/bug.839.t +++ b/test/bug.839.t @@ -33,8 +33,12 @@ use Test::More tests => 2; delete $ENV{'TASKDATA'}; delete $ENV{'TASKRC'}; +use File::Basename; +my $ut = basename ($0); +my $rc = $ut . '.rc'; + # Create the rc file. -if (open my $fh, '>', 'bug.rc') +if (open my $fh, '>', $rc) { print $fh "data.location=.\n"; close $fh; @@ -46,11 +50,11 @@ if (open my $fh, '>', 'pending.data') close $fh; } -my $output = qx{../src/task rc:bug.rc list 2>&1}; -like ($output, qr/One/, 'task listed'); -unlike ($output, qr/The recurrence value '1m' is not valid\./, 'recu:1m => no error'); +my $output = qx{../src/task rc:$rc list 2>&1}; +like ($output, qr/One/, "$ut: task listed"); +unlike ($output, qr/The recurrence value '1m' is not valid\./, "$ut: recu:1m => no error"); # Cleanup. -unlink qw(pending.data completed.data undo.data backlog.data bug.rc); +unlink qw(pending.data completed.data undo.data backlog.data), $rc; exit 0;