X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ad8caead208db46a636808a4d2bb49d677c061a4..790ba596c6d6bdfed3963f81274a142946aca12a:/ext/B/t/deparse.t diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t index 22bd782..50746e7 100644 --- a/ext/B/t/deparse.t +++ b/ext/B/t/deparse.t @@ -15,7 +15,7 @@ use warnings; use strict; use Config; -print "1..16\n"; +print "1..18\n"; use B::Deparse; my $deparse = B::Deparse->new() or print "not "; @@ -25,7 +25,7 @@ print "ok " . $i++ . "\n"; # Tell B::Deparse about our ambient pragmas { my ($hint_bits, $warning_bits); - BEGIN {($hint_bits, $warning_bits) = ($^H, ${^WARNING_BITS})} + BEGIN { ($hint_bits, $warning_bits) = ($^H, ${^WARNING_BITS}); } $deparse->ambient_pragmas ( hint_bits => $hint_bits, warning_bits => $warning_bits, @@ -99,7 +99,7 @@ $path .= " -MMac::err=unix" if $Is_MacOS; my $redir = $Is_MacOS ? "" : "2>&1"; $a = `$^X $path "-MO=Deparse" -anlwi.bak -e 1 $redir`; -$a =~ s/(?:# )?-e syntax OK\n//g; # "# " for Mac OS +$a =~ s/-e syntax OK\n//g; $a =~ s/.*possible typo.*\n//; # Remove warning line $a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037 $a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc' @@ -113,7 +113,18 @@ LINE: while (defined($_ = )) { '???'; } EOF -print "# [$a]\n\# vs expected\n# [$b]\nnot " if $a ne $b; +$b =~ s/(LINE:)/sub BEGIN { + 'MacPerl'->bootstrap; + 'OSA'->bootstrap; + 'XL'->bootstrap; +} +$1/ if $Is_MacOS; +if ($a ne $b) { + # A temporary debugging aid (Tru64 threaded smoke test somehow + # broke between 19150 and 19160, but works okay from command line.) + print STDERR "# [$a]\n\# vs expected\n# [$b]\n"; + print "not "; +} print "ok " . $i++ . "\n"; __DATA__ @@ -184,3 +195,9 @@ $x{warn()}; # 13 my $foo; $_ .= . <$foo>; +#### +# 14 +my $foo = "Ab\x{100}\200\x{200}\377Cd\000Ef\x{1000}\cA\x{2000}\cZ"; +#### +# 15 +s/x/'y';/e;