This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert ext/Opcode/t/ops.t to Test::More
[perl5.git] / ext / Opcode / t / ops.t
CommitLineData
76d62587
PP
1#!./perl
2
3BEGIN {
76d62587
PP
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
9f29e3f6 11use Test::More tests => 2;
76d62587
PP
12
13eval <<'EOP';
9f29e3f6 14 no ops 'fileno';
76d62587
PP
15 $a = fileno STDIN;
16EOP
17
9f29e3f6 18like($@, qr/trapped/, 'equiv to "perl -M-ops=fileno"');
76d62587
PP
19
20eval <<'EOP';
9f29e3f6 21 use ops ':default';
76d62587
PP
22 eval 1;
23EOP
24
9f29e3f6 25like($@, qr/trapped/, 'equiv to "perl -Mops=:default"');