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