From: Jarkko Hietaniemi Date: Thu, 21 Feb 2002 22:05:20 +0000 (+0000) Subject: Testing for ASCII in EBCDIC makes one's brain hurt. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=248175870b24dd04bea0abf89f6b13929587b79b;p=p5sagit%2Fp5-mst-13.2.git Testing for ASCII in EBCDIC makes one's brain hurt. p4raw-id: //depot/perl@14821 --- diff --git a/t/op/pat.t b/t/op/pat.t index 9af9359..d112bcc 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -1422,16 +1422,21 @@ print "ok 247\n"; print "ok $test\n"; $test++; } print "# IsASCII\n"; - if ($code le '00007f') { - print "not " unless $char =~ /\p{IsASCII}/; - print "ok $test\n"; $test++; - print "not " if $char =~ /\P{IsASCII}/; - print "ok $test\n"; $test++; + if (ord("A") == 193) { + print "ok $test # Skip: in EBCDIC\n"; $test++; + print "ok $test # Skip: in EBCDIC\n"; $test++; } else { - print "not " if $char =~ /\p{IsASCII}/; - print "ok $test\n"; $test++; - print "not " unless $char =~ /\P{IsASCII}/; - print "ok $test\n"; $test++; + if ($code le '00007f') { + print "not " unless $char =~ /\p{IsASCII}/; + print "ok $test\n"; $test++; + print "not " if $char =~ /\P{IsASCII}/; + print "ok $test\n"; $test++; + } else { + print "not " if $char =~ /\p{IsASCII}/; + print "ok $test\n"; $test++; + print "not " unless $char =~ /\P{IsASCII}/; + print "ok $test\n"; $test++; + } } print "# IsCntrl\n"; if ($class =~ /^C/) {