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;