Commit | Line | Data |
80305961 |
1 | #!./perl |
80305961 |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
5 | @INC = '../lib'; |
02eafbe2 |
6 | unless ( -r "$INC[0]/Errno.pm") { |
7 | print "1..0 # Skip: Errno.pm not yet available\n"; |
8 | exit 0; |
9 | } |
80305961 |
10 | } |
11 | |
02eafbe2 |
12 | # WARNING: Do not directly use any modules as part of this test code. |
67261566 |
13 | # We could get action at a distance that would invalidate the tests. |
14 | |
15 | print "1..2\n"; |
16 | |
17 | # This tests whether glob assignment fails to load the tie. |
80305961 |
18 | *X = *-; |
67261566 |
19 | 'X'=~/(?<X>X)/; |
20 | print eval '*X{HASH}{X} || 1' ? "" :"not ","ok ",++$test,"\n"; |
21 | |
02eafbe2 |
22 | # And since it's a similar case we check %! as well. Note that |
23 | # this can't be done until ../lib/Errno.pm is in place, as the |
24 | # glob hits $!, which needs that module. |
67261566 |
25 | *Y = *!; |
26 | print 0<keys(%Y) ? "" :"not ","ok ",++$test,"\n"; |