From: Gurusamy Sarathy Date: Sun, 21 Apr 2002 20:50:21 +0000 (+0000) Subject: use compare_text() rather than compare() to avoid bogus X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a7565946fd458b78319f17b54a7f7cf3cbad8db;p=p5sagit%2Fp5-mst-13.2.git use compare_text() rather than compare() to avoid bogus failures when the test files happen to be CRLF terminated p4raw-id: //depot/perl@16049 --- diff --git a/ext/Encode/t/JP.t b/ext/Encode/t/JP.t index 4192a7c..43517f3 100644 --- a/ext/Encode/t/JP.t +++ b/ext/Encode/t/JP.t @@ -20,7 +20,7 @@ use Test::More tests => 37; use Encode; use File::Basename; use File::Spec; -use File::Compare; +use File::Compare qw(compare_text); require_ok "Encode::JP"; my ($src, $uni, $dst, $txt, $euc, $utf, $ref, $rnd); @@ -50,7 +50,7 @@ for my $charset (qw(jisx0201 jisx0212 jisx0208)){ binmode($dst); print $dst $uni; close($dst); - is(compare($utf, $ref), 0, "$utf eq $ref"); + is(compare_text($utf, $ref), 0, "$utf eq $ref"); open $src, "<:utf8", $ref or die "$ref : $!"; $uni = join('', <$src>); @@ -81,7 +81,7 @@ for my $charset (qw(jisx0201 jisx0212 jisx0208)){ binmode($dst); print $dst $txt; close($dst); - is(compare($euc, $rnd), 0 => "$rnd eq $euc"); + is(compare_text($euc, $rnd), 0 => "$rnd eq $euc"); } END {