Package: libpar-packer-perl Version: 1.002-1 Severity: important Tags: patch User: [email protected] Usertags: perl-5.12-transition
t/30-current_exec.t fails when the build directory path contains regexp metacharacters. This breaks binNMUing the package at least in my (more or less default) sbuild setup because the '+b1' version suffix ends up in the build directory name. % pwd /home/niko/tmp/test+dir/libpar-packer-perl-1.002 % perl -Iblib/lib -Iblib/arch t/30-current_exec.t 1..4 # Please wait ok 1 - Created "/home/niko/tmp/test+dir/libpar-packer-perl-1.002/t/test-10.exec" not ok 2 - Respected PAR_GLOBAL_TMPDIR # Failed test 'Respected PAR_GLOBAL_TMPDIR' # at t/30-current_exec.t line 46. ok 3 - Found the same file via PATH and full path # Please wait ok 4 - Found the same file via execvp and PATH # Looks like you failed 1 test of 4. Proposed patch attached. -- Niko Tyni [email protected]
>From d61a057ca49d33db816b8f4ea2a3716904679219 Mon Sep 17 00:00:00 2001 From: Niko Tyni <[email protected]> Date: Fri, 9 Apr 2010 22:28:50 +0300 Subject: [PATCH] Fix t/30-current_exec.t failing when cwd contains regexp metacharacters As TEMPDIR contains the build directory name, it may have regexp metacharacter like '+' in that need escaping. --- t/30-current_exec.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/30-current_exec.t b/t/30-current_exec.t index 4801543..d5baffe 100644 --- a/t/30-current_exec.t +++ b/t/30-current_exec.t @@ -43,7 +43,7 @@ ok( (-f $EXEC), "Created \"$EXEC\"" ) $ENV{PAR_GLOBAL_TMPDIR} = $TEMP; my $out_full = qx($EXEC); -ok( ($out_full =~ /PAR_TEMP = $TEMP/), "Respected PAR_GLOBAL_TMPDIR" ); +ok( ($out_full =~ /PAR_TEMP = \Q$TEMP\E/), "Respected PAR_GLOBAL_TMPDIR" ); my( $file, $path ) = fileparse( $EXEC ); -- 1.7.0.4

