From 7f87ebdee889e926f16b463ad8286de8d6186035 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Aug 2014 17:22:26 -0400 Subject: [PATCH] Unit Tests - Upgraded to use the new template. --- test/bug.441.t | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/bug.441.t b/test/bug.441.t index a06dd7087..2c7e8cc82 100755 --- a/test/bug.441.t +++ b/test/bug.441.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, '>', '441.rc') +if (open my $fh, '>', $rc) { print $fh "data.location=.\n", "confirmation=off\n"; @@ -43,11 +47,11 @@ if (open my $fh, '>', '441.rc') } # Bug #441: A colon messes up text replacement with /// -qx{../src/task rc:441.rc add one two three 2>&1}; -qx{../src/task rc:441.rc 1 modify /two/two:/ 2>&1}; -my $output = qx{../src/task rc:441.rc ls 2>&1}; -like ($output, qr/one two: three/ms, 'Substitution with colon worked'); +qx{../src/task rc:$rc add one two three 2>&1}; +qx{../src/task rc:$rc 1 modify /two/two:/ 2>&1}; +my $output = qx{../src/task rc:$rc ls 2>&1}; +like ($output, qr/one two: three/ms, "$ut: Substitution with colon worked"); # Cleanup. -unlink qw(pending.data completed.data undo.data backlog.data 441.rc); +unlink qw(pending.data completed.data undo.data backlog.data), $rc; exit 0;