diff options
author | bulk88 <bulk88@hotmail.com> | 2015-12-27 15:31:13 -0500 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-01-25 11:11:48 +1100 |
commit | a766b711cb8fa942bb620f6e525dad33e44976f8 (patch) | |
tree | e2743023129888667820b4b96ae45856c435ab95 | |
parent | 9cc600a92e7d683d4b053eb5e84ca8654ce82ac4 (diff) | |
download | perl-a766b711cb8fa942bb620f6e525dad33e44976f8.tar.gz |
t/echo.t needs SHELL env for Win32 gmake
Win32 gmake prefers "sh.exe" (IE bash) over "cmd.exe" if it finds sh.exe
in PATH. Win32 Git usually comes with sh.exe. Running sh.exe causes
problems and isn't a supported build config for native (not Cygwin)
Win32 perl. See also
https://rt.perl.org/Public/Bug/Display.html?id=123440#txn-1374997
Fixes
---------------------------------
ok 8 - something.txt exists
not ok 9 - contents# Failed test 'contents'
# at t/echo.t line 69.
# got: '$
# '
# expected: '$something$
# '
# Testing variables escaped
# Temp dir: C:\Users\Owner\AppData\Local\Temp\gGwL2kl3Oh
ok 10 - make: variables escaped
-rw-r--r-- | cpan/ExtUtils-MakeMaker/t/echo.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/echo.t b/cpan/ExtUtils-MakeMaker/t/echo.t index 355eaa24be..6d424d1317 100644 --- a/cpan/ExtUtils-MakeMaker/t/echo.t +++ b/cpan/ExtUtils-MakeMaker/t/echo.t @@ -33,6 +33,9 @@ $mm->init_tools; # need ECHO # Run Perl with the currently installing MakeMaker $mm->{$_} .= q[ "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"] for qw( PERLRUN FULLPERLRUN ABSPERLRUN ); +#see sub specify_shell +my $shell = $^O eq 'MSWin32' && $mm->is_make_type('gmake') ? $ENV{COMSPEC} : undef; + #------------------- Testing functions sub test_for_echo { @@ -53,6 +56,7 @@ sub test_for_echo { for my $key (qw(INST_ARCHLIB INST_LIB PERL ABSPERL ABSPERLRUN ECHO)) { print $makefh "$key=$mm->{$key}\n"; } + print $makefh "SHELL=$shell\n" if defined $shell; print $makefh "all :\n"; for my $args (@$calls) { |