Debian Codegraph @

ext/Opcode/t/ops.t

raw
1 #!./perl
2
3 BEGIN {
4 require Config; import Config;
5 if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
6 print "1..0\n";
7 exit 0;
8 }
9 }
10
11 use Test::More tests => 2;
12
13 eval <<'EOP';
14 no ops 'fileno';
15 $a = fileno STDIN;
16 EOP
17
18 like($@, qr/trapped/, 'equiv to "perl -M-ops=fileno"');
19
20 eval <<'EOP';
21 use ops ':default';
22 eval 1;
23 EOP
24
25 like($@, qr/trapped/, 'equiv to "perl -Mops=:default"');