From: Rafael Garcia-Suarez Date: Fri, 2 Dec 2005 23:00:55 +0000 (+0000) Subject: Replace ^M by a space in test for bug #37716, to make X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23c2666825f6d4396328e332025722d15959b207;p=p5sagit%2Fp5-mst-13.2.git Replace ^M by a space in test for bug #37716, to make Cygwin happy (found by Yitzchak) p4raw-id: //depot/perl@26245 --- diff --git a/lib/File/Compare.t b/lib/File/Compare.t index c52d873..504c789 100644 --- a/lib/File/Compare.t +++ b/lib/File/Compare.t @@ -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 $@;