1N/A#!./perl
1N/A
1N/ABEGIN {
1N/A chdir 't' if -d 't';
1N/A if ($^O eq 'MacOS') {
1N/A @INC = qw(: ::lib ::macos:lib);
1N/A } else {
1N/A @INC = '../lib';
1N/A }
1N/A}
1N/A
1N/A$| = 1;
1N/Ause warnings;
1N/Ause strict;
1N/Ause Config;
1N/A
1N/Aprint "1..1\n";
1N/A
1N/Amy $test = 1;
1N/A
1N/Asub ok { print "ok $test\n"; $test++ }
1N/A
1N/A
1N/Amy $got;
1N/Amy $Is_VMS = $^O eq 'VMS';
1N/Amy $Is_MacOS = $^O eq 'MacOS';
1N/A
1N/Amy $path = join " ", map { qq["-I$_"] } @INC;
1N/A$path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise
1N/Amy $redir = $Is_MacOS ? "" : "2>&1";
1N/A
1N/Achomp($got = `$^X $path "-MB::Stash" "-Mwarnings" -e1`);
1N/A
1N/A$got =~ s/-u//g;
1N/A
1N/Aprint "# got = $got\n";
1N/A
1N/Amy @got = map { s/^\S+ //; $_ }
1N/A sort { $a cmp $b }
1N/A map { lc($_) . " " . $_ }
1N/A split /,/, $got;
1N/A
1N/Aprint "# (after sorting)\n";
1N/Aprint "# got = @got\n";
1N/A
1N/A@got = grep { ! /^(PerlIO|open)(?:::\w+)?$/ } @got;
1N/A
1N/Aprint "# (after perlio censorings)\n";
1N/Aprint "# got = @got\n";
1N/A
1N/A@got = grep { ! /^Win32$/ } @got if $^O eq 'MSWin32';
1N/A@got = grep { ! /^NetWare$/ } @got if $^O eq 'NetWare';
1N/A@got = grep { ! /^(Cwd|File|File::Copy|OS2)$/ } @got if $^O eq 'os2';
1N/A@got = grep { ! /^Cwd$/ } @got if $^O eq 'cygwin';
1N/A
1N/Aif ($Is_VMS) {
1N/A @got = grep { ! /^File(?:::Copy)?$/ } @got;
1N/A @got = grep { ! /^VMS(?:::Filespec)?$/ } @got;
1N/A @got = grep { ! /^vmsish$/ } @got;
1N/A # Socket is optional/compiler version dependent
1N/A @got = grep { ! /^Socket$/ } @got;
1N/A}
1N/A
1N/Aprint "# (after platform censorings)\n";
1N/Aprint "# got = @got\n";
1N/A
1N/A$got = "@got";
1N/A
1N/Amy $expected = "attributes Carp Carp::Heavy DB Exporter Exporter::Heavy Internals main Regexp utf8 warnings";
1N/A
1N/A{
1N/A no strict 'vars';
1N/A use vars '$OS2::is_aout';
1N/A}
1N/A
1N/Aif ((($Config{static_ext} eq ' ') || ($Config{static_ext} eq ''))
1N/A && !($^O eq 'os2' and $OS2::is_aout)
1N/A ) {
1N/A print "# [$got]\n# vs.\n# [$expected]\nnot " if $got ne $expected;
1N/A ok;
1N/A} else {
1N/A print "ok $test # skipped: one or more static extensions\n"; $test++;
1N/A}
1N/A