From: Vincent Pit Date: Sat, 27 Dec 2008 20:41:53 +0000 (+0100) Subject: Wrap t/bin/git into t/bin/git.bat to test on Win32 X-Git-Tag: v0.06~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=96305cc47956df73a5cc024cf3291de16566da3d;p=perl%2Fmodules%2Frgit.git Wrap t/bin/git into t/bin/git.bat to test on Win32 --- diff --git a/MANIFEST b/MANIFEST index 984d939..fd312d1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -22,3 +22,4 @@ t/92-pod-coverage.t t/95-portability-files.t t/99-kwalitee.t t/bin/git +t/bin/git.bat diff --git a/t/bin/git.bat b/t/bin/git.bat new file mode 100644 index 0000000..dc7447a --- /dev/null +++ b/t/bin/git.bat @@ -0,0 +1,28 @@ +@rem = '--*-Perl-*-- +@echo off +if "%OS%" == "Windows_NT" goto WinNT +perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 +goto endofperl +:WinNT +perl -x -S %0 %* +if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl +if %errorlevel% == 9009 echo You do not have Perl in your PATH. +if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul +goto endofperl +@rem '; +#!/usr/bin/env perl +#line 15 + +# This has to work with olde perls + +my $filename = shift @ARGV; +my $cmd = shift @ARGV; +open FH, ">>$filename" or die "open($filename): $!"; +print FH join '|', $cmd, @ARGV; +print FH "\n"; +close FH; + +exit(($cmd && $cmd eq 'FAIL') ? 1 : 0); + +__END__ +:endofperl