Commit | Line | Data |
87a42246 |
1 | #!./perl |
2 | |
3 | BEGIN { |
4 | if ($^O eq 'MacOS') { |
5 | @INC = qw(: ::lib ::macos:lib); |
6 | } |
7 | } |
8 | |
9 | $| = 1; |
10 | use warnings; |
11 | use strict; |
12 | use Config; |
13 | |
14 | print "1..1\n"; |
15 | |
16 | my $test = 1; |
17 | |
18 | sub ok { print "ok $test\n"; $test++ } |
19 | |
20 | my $a; |
21 | my $Is_VMS = $^O eq 'VMS'; |
22 | my $Is_MacOS = $^O eq 'MacOS'; |
23 | |
24 | my $path = join " ", map { qq["-I$_"] } @INC; |
d0c1fe9a |
25 | $path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise |
87a42246 |
26 | my $redir = $Is_MacOS ? "" : "2>&1"; |
27 | my $is_thread = $Config{use5005threads} && $Config{use5005threads} eq 'define'; |
28 | |
29 | if ($is_thread) { |
30 | print "# use5005threads: test $test skipped\n"; |
31 | } else { |
32 | $a = `$^X $path "-MO=Showlex" -e "my %one" $redir`; |
33 | if (ord('A') != 193) { # ASCIIish |
34 | print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s; |
35 | } |
36 | else { # EBCDICish C<1: PVNV (0x1a7ede34) "%\226\225\205"> |
37 | print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%\\[0-9].*sv_undef.*HV/s; |
38 | } |
39 | } |
40 | ok; |