From: Graham Knop Date: Tue, 29 Oct 2013 14:25:06 +0000 (-0400) Subject: fix stackable test on windows X-Git-Tag: 1.008025~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=728c6c4daf1f60baf0941edabf56b852566ea76b;p=p5sagit%2Flocal-lib.git fix stackable test on windows --- diff --git a/t/stackable.t b/t/stackable.t index c3b25b1..c73d7f3 100644 --- a/t/stackable.t +++ b/t/stackable.t @@ -26,7 +26,8 @@ like $ENV{PERL_LOCAL_LIB_ROOT}, qr/\Q$dir1/, 'added one dir in root'; like $ENV{PERL5LIB}, qr/\Q$dir1/, 'added one dir in lib'; note $ENV{PERL5LIB}; unlike $ENV{PERL5LIB}, qr/\Q$dir1_arch/, 'no arch in PERL5LIB'; -like $ENV{PERL_MM_OPT}, qr/\Q$dir1/, 'first path is installation target'; +my $dir1_escape = local::lib::_mm_escape_path($dir1); +like $ENV{PERL_MM_OPT}, qr/\Q$dir1_escape/, 'first path is installation target'; local::lib->import($dir1); is +() = local::lib->active_paths, $prev_active + 1, 'still one active path after adding it twice'; @@ -39,13 +40,14 @@ unlike $ENV{PERL5LIB}, qr/\Q$dir2_arch/, 'no arch in PERL5LIB'; like $ENV{PERL_LOCAL_LIB_ROOT}, qr/\Q$dir1/, 'first dir is still in root'; like $ENV{PERL5LIB}, qr/\Q$dir1/, 'first dir is still in lib'; unlike $ENV{PERL5LIB}, qr/\Q$dir1_arch/, 'no arch in PERL5LIB'; -like $ENV{PERL_MM_OPT}, qr/\Q$dir2/, 'second path is installation target'; +my $dir2_escape = local::lib::_mm_escape_path($dir2); +like $ENV{PERL_MM_OPT}, qr/\Q$dir2_escape/, 'second path is installation target'; local::lib->import($dir1); my @active = local::lib->active_paths; is @active, $prev_active + 2, 'still two active dirs after re-adding first'; is $active[-1], $dir1, 'first dir was re-added on top'; -like $ENV{PERL_MM_OPT}, qr/\Q$dir1/, 'first path is installation target again'; +like $ENV{PERL_MM_OPT}, qr/\Q$dir1_escape/, 'first path is installation target again'; local::lib->import('--deactivate', $dir2); unlike $ENV{PERL_LOCAL_LIB_ROOT}, qr/\Q$dir2/, 'second dir was removed from root'; @@ -54,4 +56,4 @@ unlike $ENV{PERL5LIB}, qr/\Q$dir2_arch/, 'no arch in PERL5LIB'; like $ENV{PERL_LOCAL_LIB_ROOT}, qr/\Q$dir1/, q{first dir didn't go away from root}; like $ENV{PERL5LIB}, qr/\Q$dir1/, q{first dir didn't go away from lib}; unlike $ENV{PERL5LIB}, qr/\Q$dir1_arch/, 'no arch in PERL5LIB'; -like $ENV{PERL_MM_OPT}, qr/\Q$dir1/, 'first dir stays installation target'; +like $ENV{PERL_MM_OPT}, qr/\Q$dir1_escape/, 'first dir stays installation target';