Commit | Line | Data |
87a42246 |
1 | #!./perl |
2 | |
3 | BEGIN { |
88587957 |
4 | chdir 't' if -d 't'; |
87a42246 |
5 | if ($^O eq 'MacOS') { |
6 | @INC = qw(: ::lib ::macos:lib); |
88587957 |
7 | } else { |
8 | @INC = '../lib'; |
87a42246 |
9 | } |
10 | } |
11 | |
12 | $| = 1; |
13 | use warnings; |
14 | use strict; |
15 | use Config; |
16 | |
17 | print "1..1\n"; |
18 | |
19 | my $test = 1; |
20 | |
21 | sub ok { print "ok $test\n"; $test++ } |
22 | |
23 | |
9fc0d0ff |
24 | my $got; |
87a42246 |
25 | my $Is_VMS = $^O eq 'VMS'; |
26 | my $Is_MacOS = $^O eq 'MacOS'; |
27 | |
28 | my $path = join " ", map { qq["-I$_"] } @INC; |
c614a829 |
29 | $path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise |
87a42246 |
30 | my $redir = $Is_MacOS ? "" : "2>&1"; |
31 | |
9fc0d0ff |
32 | chomp($got = `$^X $path "-MB::Stash" "-Mwarnings" -e1`); |
33 | |
34 | $got =~ s/-u//g; |
35 | |
36 | print "# got = $got\n"; |
37 | |
38 | my @got = map { s/^\S+ //; $_ } |
39 | sort { $a cmp $b } |
40 | map { lc($_) . " " . $_ } |
41 | split /,/, $got; |
42 | |
43 | print "# (after sorting)\n"; |
44 | print "# got = @got\n"; |
45 | |
46 | @got = grep { ! /^(PerlIO|open)(?:::\w+)?$/ } @got; |
47 | |
48 | print "# (after perlio censorings)\n"; |
49 | print "# got = @got\n"; |
50 | |
51 | @got = grep { ! /^Win32$/ } @got if $^O eq 'MSWin32'; |
52 | @got = grep { ! /^NetWare$/ } @got if $^O eq 'NetWare'; |
53 | @got = grep { ! /^(Cwd|File|File::Copy|OS2)$/ } @got if $^O eq 'os2'; |
54 | @got = grep { ! /^Cwd$/ } @got if $^O eq 'cygwin'; |
87a42246 |
55 | |
38535c98 |
56 | if ($Is_VMS) { |
9fc0d0ff |
57 | @got = grep { ! /^File(?:::Copy)?$/ } @got; |
58 | @got = grep { ! /^VMS(?:::Filespec)?$/ } @got; |
59 | @got = grep { ! /^vmsish$/ } @got; |
60 | # Socket is optional/compiler version dependent |
61 | @got = grep { ! /^Socket$/ } @got; |
38535c98 |
62 | } |
371ddd85 |
63 | |
9fc0d0ff |
64 | print "# (after platform censorings)\n"; |
65 | print "# got = @got\n"; |
66 | |
67 | $got = "@got"; |
68 | |
86aa26c7 |
69 | my $expected = "attributes Carp Carp::Heavy DB Exporter Exporter::Heavy Internals main utf8 version warnings"; |
9fc0d0ff |
70 | |
371ddd85 |
71 | { |
72 | no strict 'vars'; |
73 | use vars '$OS2::is_aout'; |
74 | } |
9fc0d0ff |
75 | |
c614a829 |
76 | if ((($Config{static_ext} eq ' ') || ($Config{static_ext} eq '')) |
347fb945 |
77 | && !($^O eq 'os2' and $OS2::is_aout) |
371ddd85 |
78 | ) { |
9fc0d0ff |
79 | print "# [$got]\n# vs.\n# [$expected]\nnot " if $got ne $expected; |
371ddd85 |
80 | ok; |
87a42246 |
81 | } else { |
371ddd85 |
82 | print "ok $test # skipped: one or more static extensions\n"; $test++; |
87a42246 |
83 | } |
371ddd85 |
84 | |