Commit | Line | Data |
76d62587 |
1 | #!./perl |
2 | |
3 | BEGIN { |
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 | |
13 | print "1..2\n"; |
14 | |
15 | eval <<'EOP'; |
16 | no ops 'fileno'; # equiv to "perl -M-ops=fileno" |
17 | $a = fileno STDIN; |
18 | EOP |
19 | |
20 | print $@ =~ /trapped/ ? "ok 1\n" : "not ok 1\n# $@\n"; |
21 | |
22 | eval <<'EOP'; |
23 | use ops ':default'; # equiv to "perl -M(as above) -Mops=:default" |
24 | eval 1; |
25 | EOP |
26 | |
27 | print $@ =~ /trapped/ ? "ok 2\n" : "not ok 2\n# $@\n"; |
28 | |
29 | 1; |