summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-28 15:28:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-28 15:28:29 +0000
commiteab60bb1f2e96e200fbded3694574d80930d568e (patch)
tree8b85eca8f9c2415b91c9359e1123c22bc3fb5b32 /t
parentd3cf3892100cfc5e4143b94111b619e8eb2b1937 (diff)
downloadperl-eab60bb1f2e96e200fbded3694574d80930d568e.tar.gz
enable Errno build on win32, add Errno-1.08 files to repository
p4raw-id: //depot/perl@1222
Diffstat (limited to 't')
-rwxr-xr-xt/lib/errno.t36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/lib/errno.t b/t/lib/errno.t
new file mode 100755
index 0000000000..0e0462b32a
--- /dev/null
+++ b/t/lib/errno.t
@@ -0,0 +1,36 @@
+#!./perl
+
+BEGIN {
+ unless(grep /blib/, @INC) {
+ chdir 't' if -d 't';
+ @INC = '../lib' if -d '../lib';
+ }
+}
+
+use Errno;
+
+print "1..5\n";
+
+print "not " unless @Errno::EXPORT_OK;
+print "ok 1\n";
+die unless @Errno::EXPORT_OK;
+
+$err = $Errno::EXPORT_OK[0];
+$num = &{"Errno::$err"};
+
+print "not " unless &{"Errno::$err"} == $num;
+print "ok 2\n";
+
+$! = $num;
+print "not " unless $!{$err};
+print "ok 3\n";
+
+$! = 0;
+print "not " if $!{$err};
+print "ok 4\n";
+
+$s1 = join(",",sort keys(%!));
+$s2 = join(",",sort @Errno::EXPORT_OK);
+
+print "not " unless $s1 eq $s2;
+print "ok 5\n";