Integrate mainline
[p5sagit/p5-mst-13.2.git] / ext / Opcode / ops.t
CommitLineData
76d62587 1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
20822f61 5 @INC = '../lib';
76d62587 6 require Config; import Config;
7 if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
8 print "1..0\n";
9 exit 0;
10 }
11}
12
13print "1..2\n";
14
15eval <<'EOP';
16 no ops 'fileno'; # equiv to "perl -M-ops=fileno"
17 $a = fileno STDIN;
18EOP
19
20print $@ =~ /trapped/ ? "ok 1\n" : "not ok 1\n# $@\n";
21
22eval <<'EOP';
23 use ops ':default'; # equiv to "perl -M(as above) -Mops=:default"
24 eval 1;
25EOP
26
27print $@ =~ /trapped/ ? "ok 2\n" : "not ok 2\n# $@\n";
28
291;