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