X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fgenerated_app.t;h=01469b96cfe13a42bfc2e4be60372d1e5a60bd2e;hb=8538078e75e2c1335fc31f893b63da5a0cdf47bf;hp=d83032e0d63bb394232572c2ecdea6cac76b6737;hpb=e5799f980ad26354fb2049ad9f611df0c665c743;p=catagits%2FCatalyst-Devel.git diff --git a/t/generated_app.t b/t/generated_app.t index d83032e..01469b9 100644 --- a/t/generated_app.t +++ b/t/generated_app.t @@ -23,8 +23,14 @@ my $instdir = tempdir(CLEANUP => 1); my $MAKE = $Config{make} || 'make'; -$ENV{PERL_MM_OPT} = "INSTALL_BASE=$instdir"; -$ENV{INSTALL_BASE} = $instdir; +my $escaped_path = $instdir; +$escaped_path =~ s/\\/\\\\/g; +if ($escaped_path =~ s/ /\\ /g) { + $escaped_path = qq{"$escaped_path"}; +} + +$ENV{PERL_MM_OPT} = "INSTALL_BASE=$escaped_path"; + if ($ENV{MAKEFLAGS}) { $ENV{MAKEFLAGS} =~ s/PREFIX=[^\s]+//; $ENV{MAKEFLAGS} =~ s/INSTALL_BASE=[^\s]+//; @@ -33,7 +39,7 @@ if ($ENV{MAKEFLAGS}) { my $dir = tempdir(CLEANUP => 1); my $devnull = devnull; -diag "Generated app is in $dir"; +note "Generated app is in $dir"; chdir $dir or die "Cannot chdir to $dir: $!"; @@ -129,7 +135,7 @@ my $server_script_new = do { is $server_script, $server_script_new; -diag "Installed app is in $instdir"; +note "Installed app is in $instdir"; command_ok( [ $MAKE, 'install' ] ); my $inst_app_dir = catdir($instdir);