From: Graham Knop Date: Mon, 13 Jan 2014 15:11:30 +0000 (-0500) Subject: allow trailing PATH entries in shell test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e5cbb98481ba4e3e4812fa7dd46457f5719e8e55;p=p5sagit%2Flocal-lib.git allow trailing PATH entries in shell test --- diff --git a/t/shell.t b/t/shell.t index 4088216..52ecee8 100644 --- a/t/shell.t +++ b/t/shell.t @@ -80,7 +80,8 @@ for my $shell (@shells) { my $env = call_ll($shell, "$ll"); is $env->{PERL_LOCAL_LIB_ROOT}, $ll_dir, "$shell->{name}: activate root"; - is $env->{PATH}, local::lib->install_base_bin_path($ll_dir)."$sep$root", + my $bin_path = local::lib->install_base_bin_path($ll_dir); + like $env->{PATH}, qr/^\Q$bin_path$sep$root\E(?:$|\Q$sep\E)/, "$shell->{name}: activate PATH"; is $env->{PERL5LIB}, local::lib->install_base_perl_path($ll_dir), "$shell->{name}: activate PERL5LIB"; @@ -90,7 +91,7 @@ for my $shell (@shells) { is $env->{PERL_LOCAL_LIB_ROOT}, undef, "$shell->{name}: deactivate root"; - is $env->{PATH}, $root, + like $env->{PATH}, qr/^\Q$root\E(?:$|\Q$sep\E)/, "$shell->{name}: deactivate PATH"; is $env->{PERL5LIB}, undef, "$shell->{name}: deactivate PERL5LIB";