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