From bb5d0dbb73feec71e30d9db63af134b3d422b857 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Aug 2014 17:20:05 -0400 Subject: [PATCH] Unit Tests - Upgraded to use the new template. --- test/bug.434.t | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/bug.434.t b/test/bug.434.t index 59d40c855..c5d419e56 100755 --- a/test/bug.434.t +++ b/test/bug.434.t @@ -33,8 +33,12 @@ use Test::More tests => 1; 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", "confirmation=off\n"; @@ -44,11 +48,11 @@ if (open my $fh, '>', 'bug.rc') # Bug #434: Task shouldn't prevent users from marking as done tasks with status:waiting # Add a task that is waiting -qx{../src/task rc:bug.rc add One wait:tomorrow 2>&1}; -my $output = qx{../src/task rc:bug.rc 1 done 2>&1}; -like ($output, qr/Completed 1 task\./, 'Waiting task marked completed'); +qx{../src/task rc:$rc add One wait:tomorrow 2>&1}; +my $output = qx{../src/task rc:$rc 1 done 2>&1}; +like ($output, qr/Completed 1 task\./, "$ut: Waiting task marked completed"); # 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;