source: vendor/perl/5.8.8/lib/ExtUtils/t/MM_OS2.t

Last change on this file was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 6.9 KB
Line 
1#!/usr/bin/perl -w
2
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 chdir 't' if -d 't';
6 @INC = '../lib';
7 }
8 else {
9 unshift @INC, 't/lib';
10 }
11}
12chdir 't';
13
14use strict;
15use Test::More;
16if ($^O =~ /os2/i) {
17 plan( tests => 32 );
18} else {
19 plan( skip_all => "This is not OS/2" );
20}
21
22# for dlsyms, overridden in tests
23BEGIN {
24 package ExtUtils::MM_OS2;
25 use subs 'system', 'unlink';
26}
27
28# for maybe_command
29use File::Spec;
30
31use_ok( 'ExtUtils::MM_OS2' );
32ok( grep( 'ExtUtils::MM_OS2', @MM::ISA),
33 'ExtUtils::MM_OS2 should be parent of MM' );
34
35# dlsyms
36my $mm = bless({
37 SKIPHASH => {
38 dynamic => 1
39 },
40 NAME => 'foo:bar::',
41}, 'ExtUtils::MM_OS2');
42
43is( $mm->dlsyms(), '',
44 'dlsyms() should return nothing with dynamic flag set' );
45
46$mm->{BASEEXT} = 'baseext';
47delete $mm->{SKIPHASH};
48my $res = $mm->dlsyms();