From: Hugo van der Sanden Date: Thu, 22 Jan 1998 12:11:49 +0000 (+0000) Subject: [win32] another maintpatch (this one needed adjust of test nos.) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78987dedd25ff29688fc6fdb7b551d69e750279b;p=p5sagit%2Fp5-mst-13.2.git [win32] another maintpatch (this one needed adjust of test nos.) Message-Id: <199801221211.MAA05315@crypt.compulink.co.uk> Subject: Re: [PERL] A few perl5.004_03 bugs p4raw-id: //depot/win32/perl@634 --- diff --git a/mg.c b/mg.c index af2dddc..4f5f06f 100644 --- a/mg.c +++ b/mg.c @@ -1547,7 +1547,7 @@ magic_set(SV *sv, MAGIC *mg) STATUS_POSIX_SET(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); break; case '!': - SETERRNO(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv), + SETERRNO(SvIOK(sv) ? SvIVX(sv) : SvOK(sv) ? sv_2iv(sv) : 0, (SvIV(sv) == EVMSERR) ? 4 : vaxc$errno); break; case '<': diff --git a/t/op/magic.t b/t/op/magic.t index ab23d84..ec7fbb5 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -24,7 +24,7 @@ $Is_VMS = $^O eq 'VMS'; $Is_Dos = $^O eq 'dos'; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); -print "1..34\n"; +print "1..35\n"; eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; } @@ -182,20 +182,26 @@ else { : (`echo \$NoNeSuCh` eq "foo\n") ); } +{ + local $SIG{'__WARN__'} = sub { print "not " }; + $! = undef; + print "ok 31\n"; +} + # test case-insignificance of %ENV (these tests must be enabled only # when perl is compiled with -DENV_IS_CASELESS) if ($Is_MSWin32) { %ENV = (); $ENV{'Foo'} = 'bar'; $ENV{'fOo'} = 'baz'; - ok 31, (scalar(keys(%ENV)) == 1); - ok 32, exists($ENV{'FOo'}); - ok 33, (delete($ENV{'foO'}) eq 'baz'); - ok 34, (scalar(keys(%ENV)) == 0); + ok 32, (scalar(keys(%ENV)) == 1); + ok 33, exists($ENV{'FOo'}); + ok 34, (delete($ENV{'foO'}) eq 'baz'); + ok 35, (scalar(keys(%ENV)) == 0); } else { - ok "31 # skipped",1; ok "32 # skipped",1; ok "33 # skipped",1; ok "34 # skipped",1; + ok "35 # skipped",1; }