From: Jarkko Hietaniemi Date: Thu, 30 May 2002 14:07:30 +0000 (+0000) Subject: charnames patch from Thomas Wegner. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb380778361d9783746ab769632860ae78012d0f;p=p5sagit%2Fp5-mst-13.2.git charnames patch from Thomas Wegner. p4raw-id: //depot/perl@16891 --- diff --git a/lib/charnames.pm b/lib/charnames.pm index e3d06f3..fc3ad8b 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -16,7 +16,7 @@ my %alias1 = ( # Convenience. 'LF' => 'LINE FEED (LF)', 'FF' => 'FORM FEED (FF)', - 'CR' => 'CARRIAGE RETURN (LF)', + 'CR' => 'CARRIAGE RETURN (CR)', 'NEL' => 'NEXT LINE (NEL)', # More convenience. For futher convencience, # it is suggested some way using using the NamesList diff --git a/lib/charnames.t b/lib/charnames.t index cfe7642..29ee0f3 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -173,14 +173,28 @@ print "ok 24\n"; print "not " unless "\N{NULL}" eq "\c@"; print "ok 25\n"; -print "not " unless "\N{LINE FEED (LF)}" eq "\n"; -print "ok 26\n"; +if ($^O eq 'MacOS') +{ + print "not " unless "\N{CARRIAGE RETURN (CR)}" eq "\n"; + print "ok 26\n"; + + print "not " unless "\N{CARRIAGE RETURN}" eq "\n"; + print "ok 27\n"; + + print "not " unless "\N{CR}" eq "\n"; + print "ok 28\n"; +} +else +{ + print "not " unless "\N{LINE FEED (LF)}" eq "\n"; + print "ok 26\n"; -print "not " unless "\N{LINE FEED}" eq "\n"; -print "ok 27\n"; + print "not " unless "\N{LINE FEED}" eq "\n"; + print "ok 27\n"; -print "not " unless "\N{LF}" eq "\n"; -print "ok 28\n"; + print "not " unless "\N{LF}" eq "\n"; + print "ok 28\n"; +} my $nel = ord("A") == 193 ? qr/^(?:\x15|\x25)$/ : qr/^\x85$/;