diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-03-27 21:45:13 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-03-27 21:45:13 +0000 |
commit | 30ff31546a6570f575cb35e80f834c872c5abdb1 (patch) | |
tree | b5ec80133e8818c0240d33f66bea634ed1166f89 /t | |
parent | b3d30bf7e271096b5b02c85f1129c4e49c36a709 (diff) | |
parent | e38718e34241afaa26c7b803b702f286d08bb360 (diff) | |
download | perl-30ff31546a6570f575cb35e80f834c872c5abdb1.tar.gz |
Integrate mainline.
p4raw-id: //depot/perlio@9396
Diffstat (limited to 't')
-rwxr-xr-x | t/op/magic.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/op/magic.t b/t/op/magic.t index c2a82115b4..d71d6b299c 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -27,7 +27,7 @@ $Is_os2 = $^O eq 'os2'; $Is_Cygwin = $^O eq 'cygwin'; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); -print "1..35\n"; +print "1..38\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"; } @@ -226,3 +226,24 @@ else { ok "34 # skipped: no caseless %ENV support",1; ok "35 # skipped: no caseless %ENV support",1; } + +# Make sure Errno hasn't been prematurely autoloaded + +ok 36, !defined %Errno::; + +# Test auto-loading of Errno when %! is used + +ok 37, scalar eval q{ + my $errs = %!; + defined %Errno::; +}, $@; + + +# Make sure that Errno loading doesn't clobber $! + +undef %Errno::; +delete $INC{"Errno.pm"}; + +open(FOO, "nonesuch"); # Generate ENOENT +my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time +ok 38, ${"!"}{ENOENT}; |