From bd12ae96e32c6b1f51844fdcd22c41902c4c0e64 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Aug 2014 21:22:57 -0400 Subject: [PATCH] Unit Tests - Upgraded to use the new template. --- test/bug.860.t | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/bug.860.t b/test/bug.860.t index 2b1bf499d..8b1448a23 100755 --- a/test/bug.860.t +++ b/test/bug.860.t @@ -33,19 +33,23 @@ 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"; close $fh; } # Bug 869: lower case priorities aren't accepted. -qx{../src/task rc:bug.rc add foo pri:h 2>&1}; -my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; -like ($output, qr/Priority\s+H/, "pri:h --> pri:H"); +qx{../src/task rc:$rc add foo pri:h 2>&1}; +my $output = qx{../src/task rc:$rc 1 info 2>&1}; +like ($output, qr/Priority\s+H/, "$ut: pri:h --> pri:H"); # 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;