This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
filecopy.t #3 fails on dos-djgpp
[perl5.git] / t / lib / ops.t
CommitLineData
76d62587 1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
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;