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