xref: /openbsd-src/gnu/usr.bin/perl/ext/Opcode/t/ops.t (revision 898184e3e61f9129feb5978fad5a8c6865f00b92)
185009909Smillert#!./perl
285009909Smillert
385009909SmillertBEGIN {
485009909Smillert    require Config; import Config;
585009909Smillert    if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
685009909Smillert        print "1..0\n";
785009909Smillert        exit 0;
885009909Smillert    }
985009909Smillert}
1085009909Smillert
11*898184e3Ssthenuse Test::More tests => 2;
1285009909Smillert
1385009909Smillerteval <<'EOP';
14*898184e3Ssthen	no ops 'fileno';
1585009909Smillert	$a = fileno STDIN;
1685009909SmillertEOP
1785009909Smillert
18*898184e3Ssthenlike($@, qr/trapped/, 'equiv to "perl -M-ops=fileno"');
1985009909Smillert
2085009909Smillerteval <<'EOP';
21*898184e3Ssthen	use ops ':default';
2285009909Smillert	eval 1;
2385009909SmillertEOP
2485009909Smillert
25*898184e3Ssthenlike($@, qr/trapped/,  'equiv to "perl -Mops=:default"');
26