Skip Menu |

This queue is for tickets about the makepatch CPAN distribution.

Report information
The Basics
Id: 45472
Status: resolved
Priority: 0/
Queue: makepatch

People
Owner: jv [...] cpan.org
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.03
Fixed in: (no value)



Subject: [PATCH] Tests failures on MSWin32 due to eol differences
In t/basic.t tests 5 and 6 fail on Win32 because patch output use the platform EOF encoding (\r\n on Win32) while the reference files have unix EOL.
Here is the patch that fixes the tests. Note that makepatch is a major component of the CPAN distroprefs so we can not easliy and automatically patch the distrib with distroprefs.
# This is a patch for makepatch-2.03-hyWtsw to update it to makepatch-2.03-2 # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # STEP 2: Run the 'patch' program with this file as input. # #### End of Preamble #### #### Patch data follows #### diff -c "makepatch-2.03-hyWtsw\t\basic.t" "makepatch-2.03-2\t\basic.t" Index: ./t/basic.t *** ./t/basic.t Sun Oct 8 15:04:26 2006 --- ./t/basic.t Mon Apr 27 16:47:52 2009 *************** *** 138,143 **** --- 138,147 ---- $len1 = sysread (F1, $buf1, 10240); $len2 = sysread (F2, $buf2, 10240); return 0 if $len1 == $len2 && $len1 == 0; + $buf1 =~ s/(\r\n|\r|\n)/\n/g; + $buf2 =~ s/(\r\n|\r|\n)/\n/g; + $len1 = length $buf1; + $len2 = length $buf2; return 1 if $len1 != $len2 || ( $len1 && $buf1 ne $buf2 ); } } #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Mon Apr 27 17:01:56 2009 # Generated by : makepatch 2.03 # Recurse directories : Yes # Excluded files : (\A|/).*\~\Z # (\A|/).*\.a\Z # (\A|/).*\.bak\Z # (\A|/).*\.BAK\Z # (\A|/).*\.elc\Z # (\A|/).*\.exe\Z # (\A|/).*\.gz\Z # (\A|/).*\.ln\Z # (\A|/).*\.o\Z # (\A|/).*\.obj\Z # (\A|/).*\.olb\Z # (\A|/).*\.old\Z # (\A|/).*\.orig\Z # (\A|/).*\.rej\Z # (\A|/).*\.so\Z # (\A|/).*\.Z\Z # (\A|/)\.del\-.*\Z # (\A|/)\.make\.state\Z # (\A|/)\.nse_depinfo\Z # (\A|/)core\Z # (\A|/)tags\Z # (\A|/)TAGS\Z # p "t/basic.t" 2969 1240843672 0100666 #### End of ApplyPatch data #### #### End of Patch kit [created: Mon Apr 27 17:01:56 2009] #### #### Patch checksum: 51 1795 39106 #### #### Checksum: 69 2493 31485 ####
Applied in 2.04