home *** CD-ROM | disk | FTP | other *** search
- print "1..5\n";
-
- #
- # test special variables and arrays that aren't tested elsewhere
- #
-
- if (!defined($INC{'getopts.pl'})) {print "ok 1\n";} else {print "not ok 1\n";}
-
- require 'getopts.pl';
-
- if (defined($INC{'getopts.pl'})) {print "ok 2\n";} else {print "not ok 2\n";}
-
- #
- # No way to send signal to process under NT (yet!)
- #
-
- #sub handler {
- # local($sig) = @_;
- # print "Caught SIG$sig! Resetting to default\n";
- # $SIG{$sig} = 'DEFAULT';
- # $foo = "ok";
- # goto done;
- #}
-
- #$SIG{'INT'} = 'handler';
- #$foo = "not ok";
- #kill 'INT', $$;
- #done:
- # if ($foo eq "ok") {print "ok 3\n";} else {print "not ok 3\n";}
-
- #
- # test the $? special variable (exit status)
-
- `gackbarf >nul: 2>&1`;
- if ($? == 1) {print "ok 3\n";} else {print "not ok 3 ($?)\n";}
-
- `dir/w >nul: 2>&1`;
- if ($? == 0) {print "ok 4\n";} else {print "not ok 4 ($?)\n";}
-
- system "dir/w >nul: 2>&1";
- if ($? == 0) {print "ok 5\n";} else {print "not ok 5 ($?)\n";}
-