applied patch, and undid change#1302 which it made unnecessary
[p5sagit/p5-mst-13.2.git] / t / lib / errno.t
1 #!./perl
2
3 BEGIN {
4     unless(grep /blib/, @INC) {
5         chdir 't' if -d 't';
6         @INC = '../lib' if -d '../lib';
7     }
8 }
9
10 use Errno;
11
12 print "1..5\n";
13
14 print "not " unless @Errno::EXPORT_OK;
15 print "ok 1\n";
16 die unless @Errno::EXPORT_OK;
17
18 $err = $Errno::EXPORT_OK[0];
19 $num = &{"Errno::$err"};
20
21 print "not " unless &{"Errno::$err"} == $num;
22 print "ok 2\n";
23
24 $! = $num;
25 print "not " unless $!{$err};
26 print "ok 3\n";
27
28 $! = 0;
29 print "not " if $!{$err};
30 print "ok 4\n";
31
32 $s1 = join(",",sort keys(%!));
33 $s2 = join(",",sort @Errno::EXPORT_OK);
34
35 print "not " unless $s1 eq $s2;
36 print "ok 5\n";