This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert ext/IPC-Open3/t/IPC-Open3.t to Test::More
[perl5.git] / ext / Opcode / t / ops.t
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 print "1..2\n";
12
13 eval <<'EOP';
14         no ops 'fileno';        # equiv to "perl -M-ops=fileno"
15         $a = fileno STDIN;
16 EOP
17
18 print $@ =~ /trapped/ ? "ok 1\n" : "not ok 1\n# $@\n";
19
20 eval <<'EOP';
21         use ops ':default';     # equiv to "perl -M(as above) -Mops=:default"
22         eval 1;
23 EOP
24
25 print $@ =~ /trapped/ ? "ok 2\n" : "not ok 2\n# $@\n";
26
27 1;