From: Jarkko Hietaniemi Date: Thu, 16 May 2002 12:50:29 +0000 (+0000) Subject: Don't test $! with like() since one may have X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d96fb2860dc5b4f6aa03586317224ac3cf3a1114;p=p5sagit%2Fp5-mst-13.2.git Don't test $! with like() since one may have a non-English locale, or simply AIX :-) p4raw-id: //depot/perl@16620 --- diff --git a/ext/PerlIO/t/fail.t b/ext/PerlIO/t/fail.t index 87d2764..801793d 100644 --- a/ext/PerlIO/t/fail.t +++ b/ext/PerlIO/t/fail.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; require "../t/test.pl"; skip_all("No perlio") unless (find PerlIO::Layer 'perlio'); - plan (16); + plan (15); } use warnings 'layer'; @@ -21,24 +21,27 @@ ok(open(FH,"<",$file),"Normal open works"); $warn = ''; $! = 0; ok(!binmode(FH,":-)"),"All punctuation fails binmode"); -like($!,'Invalid',"Got errno"); +print "# $!\n"; +isnt($!,0,"Got errno"); like($warn,qr/in layer/,"Got warning"); $warn = ''; $! = 0; ok(!binmode(FH,":nonesuch"),"Bad package fails binmode"); -like($!,'No such',"Got errno"); +print "# $!\n"; +isnt($!,0,"Got errno"); like($warn,qr/nonesuch/,"Got warning"); close(FH); $warn = ''; $! = 0; ok(!open(FH,"<:-)",$file),"All punctuation fails open"); -like($!,"Invalid","Got errno"); -like($warn,qr/in layer/,"Got warning"); +print "# $!\n"; isnt($!,"","Got errno"); +like($warn,qr/in layer/,"Got warning"); $warn = ''; $! = 0; ok(!open(FH,"<:nonesuch",$file),"Bad package fails open"); -like($!,"No such","Got errno"); +print "# $!\n"; +isnt($!,0,"Got errno"); like($warn,qr/nonesuch/,"Got warning"); ok(open(FH,"<",$file),"Normal open (still) works");