Skip to content

Commit

Permalink
autodie/t/mkdir.t: escape build dir path
Browse files Browse the repository at this point in the history
This test file creates a regex which includes the path of the build
directory. If that path includes regex metachars (e.g. blead_g++_quick)
then the test fails. Easily fixed with \Q...\E.

Monkey-patching here rather than waiting for upstream, since this is
currently breaking blead g++ smokes.
  • Loading branch information
iabyn committed Jun 18, 2015
1 parent 047c3ca commit 1a74a75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Porting/Maintainers.pl
Expand Up @@ -156,6 +156,8 @@ package Maintainers;
t/system.t
)
],
# CPAN RT 105344
'CUSTOMIZED' => [ qw[ t/mkdir.t ] ],
},

'AutoLoader' => {
Expand Down
4 changes: 2 additions & 2 deletions cpan/autodie/t/mkdir.t
Expand Up @@ -3,8 +3,8 @@ use strict;
use Test::More;
use FindBin qw($Bin);
use constant TMPDIR => "$Bin/mkdir_test_delete_me";
use constant ERROR_REGEXP => qr{Can't mkdir\('${\(TMPDIR)}', 0777\):};
use constant SINGLE_DIGIT_ERROR_REGEXP => qr{Can't mkdir\('${\(TMPDIR)}', 0010\):};
use constant ERROR_REGEXP => qr{Can't mkdir\('\Q${\(TMPDIR)}\E', 0777\):};
use constant SINGLE_DIGIT_ERROR_REGEXP => qr{Can't mkdir\('\Q${\(TMPDIR)}\E', 0010\):};

# Delete our directory if it's there
rmdir TMPDIR;
Expand Down
1 change: 1 addition & 0 deletions t/porting/customized.dat
Expand Up @@ -49,6 +49,7 @@ Win32API::File cpan/Win32API-File/Makefile.PL 605d0aee31aebe84a99408f9ab5f644db5
Win32API::File cpan/Win32API-File/t/file.t 124e64aa77e755235eb297644a87fac5388d3d78
Win32API::File cpan/Win32API-File/t/tie.t 712ea7edd0cc805ce1c0b8172c01b03dd19b583d
Win32API::File cpan/Win32API-File/typemap 24bff088babeadac0873e8df390d1666d9d9db4a
autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac
podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6
podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
version cpan/version/lib/version.pm d0923b895d57f1d669ae36fcf85c87b16db341d1
Expand Down

0 comments on commit 1a74a75

Please sign in to comment.