This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace ^M by a space in test for bug #37716, to make
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 2 Dec 2005 23:00:55 +0000 (23:00 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 2 Dec 2005 23:00:55 +0000 (23:00 +0000)
Cygwin happy (found by Yitzchak)

p4raw-id: //depot/perl@26245

lib/File/Compare.t

index c52d873..504c789 100644 (file)
@@ -78,7 +78,8 @@ eval {
 
   my $template = File::Spec->catfile(File::Spec->tmpdir, 'fcmpXXXX');
   my($tfh,$filename) = mkstemp($template);
-  open my $tfhCR, ">", "$filename\cM"
+  # NB. The trailing space is intentional (see [perl #37716])
+  open my $tfhCR, ">", "$filename "
       or die "Could no open '$filename^M' for writing: $!";
   {
     local $/; #slurp
@@ -95,8 +96,8 @@ eval {
   $donetests[0] = compare($tfh, 'README');
   $donetests[1] = compare($filename, 'README');
   unlink0($tfh,$filename);
-  $donetests[2] = compare('README', "$filename\cM");
-  unlink "$filename\cM";
+  $donetests[2] = compare('README', "$filename ");
+  unlink "$filename ";
 };
 print "# problem '$@' when testing with a temporary file\n" if $@;