perl 1.0 patch 1: Portability bugs and one possible SIGSEGV
[p5sagit/p5-mst-13.2.git] / t / op.magic
1 #!./perl
2
3 # $Header: op.magic,v 1.0 87/12/18 13:13:54 root Exp $
4
5 print "1..4\n";
6
7 $| = 1;         # command buffering
8
9 $ENV{'foo'} = 'hi there';
10 if (`echo \$foo` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";}
11
12 $! = 0;
13 open(foo,'ajslkdfpqjsjfkslkjdflksd');
14 if ($! == 2) {print "ok 2\n";} else {print "not ok 2\n";}
15
16 $SIG{'INT'} = 'ok3';
17 kill 2,$$;
18 $SIG{'INT'} = 'IGNORE';
19 kill 2,$$;
20 print "ok 4\n";
21 $SIG{'INT'} = 'DEFAULT';
22 kill 2,$$;
23 print "not ok\n";
24
25 sub ok3 {
26     print "ok 3\n" if pop(@_) eq 'INT';
27 }