From 09337566c6851d5b25319f9b447a1c2fdeee1b7b Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 5 Jun 2006 21:39:40 +0000 Subject: [PATCH] Eliminate most of the UTF-8 black smoke by skipping optree tests when ${^OPEN} is set, and tweaking hints.t to understand that $^H is different when -C has been used. p4raw-id: //depot/perl@28354 --- ext/B/t/optree_check.t | 10 ++++++++++ ext/B/t/optree_concise.t | 18 ++++++++++++++++++ ext/B/t/optree_constants.t | 9 +++++++++ ext/B/t/optree_misc.t | 9 +++++++++ ext/B/t/optree_samples.t | 18 ++++++++++++++++++ ext/B/t/optree_sort.t | 18 ++++++++++++++++++ ext/B/t/optree_specials.t | 12 ++++++++++++ ext/B/t/optree_varinit.t | 28 ++++++++++++++++++++++++++++ t/comp/hints.t | 36 ++++++++++++++++++++++++++++-------- 9 files changed, 150 insertions(+), 8 deletions(-) diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t index 4a57b1b..b603ec9 100644 --- a/ext/B/t/optree_check.t +++ b/ext/B/t/optree_check.t @@ -36,6 +36,13 @@ SKIP: { skip "no perlio in this build", $tests unless $Config::Config{useperlio}; +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; pass("REGEX TEST HARNESS SELFTEST"); @@ -150,6 +157,7 @@ pass ("REFTEXT FIXUP TESTS"); checkOptree ( name => 'fixup nextstate (in reftext)', bcopts => '-exec', code => sub {my $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate( NOTE THAT THIS CAN BE ANYTHING ) v # 2 <0> padsv[$a:54,55] M/LVINTRO @@ -164,6 +172,7 @@ checkOptree ( name => 'fixup opcode args', bcopts => '-exec', #fail => 1, # uncomment to see real padsv args: [$a:491,492] code => sub {my $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 56 optree_concise.t:96) v # 2 <0> padsv[$a:56,57] M/LVINTRO @@ -182,6 +191,7 @@ checkOptree ( name => 'canonical example w -basic', code => sub{$a=$b+42}, crossfail => 1, debug => 1, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index 3a3d219..d37c06b 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -32,9 +32,18 @@ $SIG{__WARN__} = sub { ################################# pass("CANONICAL B::Concise EXAMPLE"); +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + checkOptree ( name => 'canonical example w -basic', bcopts => '-basic', code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 @@ -62,6 +71,7 @@ EONT_EONT checkOptree ( name => 'canonical example w -exec', bcopts => '-exec', code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 61 optree_concise.t:139) v:{ # 2 <#> gvsv[*b] s @@ -86,6 +96,7 @@ pass("B::Concise OPTION TESTS"); checkOptree ( name => '-base3 sticky-exec', bcopts => '-base3', code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> dbstate(main 24 optree_concise.t:132) v:{ 2 <#> gvsv[*b] s @@ -107,6 +118,7 @@ EONT_EONT checkOptree ( name => 'sticky-base3, -basic over sticky-exec', bcopts => '-basic', code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 21 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->21 @@ -134,6 +146,7 @@ EONT_EONT checkOptree ( name => '-base4', bcopts => [qw/ -basic -base4 /], code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 13 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->13 @@ -162,6 +175,7 @@ checkOptree ( name => "restore -base36 default", bcopts => [qw/ -basic -base36 /], code => sub{$a}, crossfail => 1, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 3 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->3 @@ -214,6 +228,7 @@ checkOptree ( name => 'cmdline invoke -basic works', 'Name "main::a" used only once: possible typo at -e line 1.', ], #bcopts => '-basic', # default + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 @@ -238,6 +253,7 @@ checkOptree ( name => 'cmdline invoke -exec works', 'Name "main::a" used only once: possible typo at -e line 1.', ], bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -284,6 +300,7 @@ checkOptree prog => 'our @a; sort @a', bcopts => [qw/ -basic -concise -exec /], errs => ['Useless use of sort in void context at -e line 1.'], + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:{ @@ -363,6 +380,7 @@ pass("set_up_relative_test, new callback installed"); checkOptree ( name => 'callback used, independent of style', bcopts => [qw/ -concise -exec /], code => sub{$a=$b+42}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main 76 optree_concise.t:337) v:{ 2 <#> gvsv[*b] s diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t index 7598c24..d927f66 100644 --- a/ext/B/t/optree_constants.t +++ b/ext/B/t/optree_constants.t @@ -24,6 +24,14 @@ plan tests => $tests; SKIP: { skip "no perlio in this build", $tests unless $Config::Config{useperlio}; +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + ################################# use constant { # see also t/op/gv.t line 282 @@ -190,6 +198,7 @@ sub printem { checkOptree ( name => 'call many in a print statement', code => \&printem, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t index 47355cd..32e75dc 100644 --- a/ext/B/t/optree_misc.t +++ b/ext/B/t/optree_misc.t @@ -21,6 +21,14 @@ plan tests => 1; SKIP: { skip "no perlio in this build", 1 unless $Config::Config{useperlio}; +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + # The regression this is testing is that the first aelemfast, derived # from a lexical array, is supposed to be a BASEOP "<0>", while the # second, from a global, is an SVOP "<$>" or a PADOP "<#>" depending @@ -29,6 +37,7 @@ skip "no perlio in this build", 1 unless $Config::Config{useperlio}; checkOptree ( name => 'OP_AELEMFAST opclass', code => sub { my @x; our @y; $x[0] + $y[0]}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # a <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->a diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index 576ff09..874e6db 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -25,11 +25,20 @@ pass("GENERAL OPTREE EXAMPLES"); pass("IF,THEN,ELSE, ?:"); +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + checkOptree ( name => '-basic sub {if shift print then,else}', bcopts => '-basic', code => sub { if (shift) { print "then" } else { print "else" } }, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 9 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->9 @@ -78,6 +87,7 @@ checkOptree ( name => '-basic (see above, with my $a = shift)', if ($a) { print "foo" } else { print "bar" } }, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # d <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->d @@ -133,6 +143,7 @@ checkOptree ( name => '-exec sub {if shift print then,else}', code => sub { if (shift) { print "then" } else { print "else" } }, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 426 optree.t:16) v # 2 <#> gv[*_] s @@ -175,6 +186,7 @@ checkOptree ( name => '-exec (see above, with my $a = shift)', if ($a) { print "foo" } else { print "bar" } }, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 423 optree.t:16) v # 2 <#> gv[*_] s @@ -222,6 +234,7 @@ EONT_EONT checkOptree ( name => '-exec sub { print (shift) ? "foo" : "bar" }', code => sub { print (shift) ? "foo" : "bar" }, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 428 optree.t:31) v # 2 <0> pushmark s @@ -253,6 +266,7 @@ pass ("FOREACH"); checkOptree ( name => '-exec sub { foreach (1..10) {print "foo $_"} }', code => sub { foreach (1..10) {print "foo $_"} }, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 443 optree.t:158) v # 2 <0> pushmark s @@ -296,6 +310,7 @@ EONT_EONT checkOptree ( name => '-basic sub { print "foo $_" foreach (1..10) }', code => sub { print "foo $_" foreach (1..10) }, bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # h <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->h @@ -353,6 +368,7 @@ EONT_EONT checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', prog => 'foreach (1..10) {print qq{foo $_}}', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v @@ -398,6 +414,7 @@ EONT_EONT checkOptree ( name => '-exec sub { print "foo $_" foreach (1..10) }', code => sub { print "foo $_" foreach (1..10) }, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 445 optree.t:167) v # 2 <;> nextstate(main 445 optree.t:167) v @@ -632,6 +649,7 @@ pass("CONSTANTS"); checkOptree ( name => '-e use constant j => qq{junk}; print j', prog => 'use constant j => qq{junk}; print j', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter # 2 <;> nextstate(main 71 -e:1) v:{ diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t index 4cdea3b..8776e4f 100644 --- a/ext/B/t/optree_sort.t +++ b/ext/B/t/optree_sort.t @@ -24,9 +24,18 @@ skip "no perlio in this build", 11 unless $Config::Config{useperlio}; pass("SORT OPTIMIZATION"); +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + checkOptree ( name => 'sub {sort @a}', code => sub {sort @a}, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 424 optree_sort.t:14) v # 2 <0> pushmark s @@ -49,6 +58,7 @@ checkOptree ( name => 'sort @a', 'Name "main::a" used only once: possible typo at -e line 1.', ], bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -70,6 +80,7 @@ EONT_EONT checkOptree ( name => 'sub {@a = sort @a}', code => sub {@a = sort @a}, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -438 optree.t:244) v 2 <0> pushmark s @@ -99,6 +110,7 @@ EONT_EONT checkOptree ( name => '@a = sort @a', prog => '@a = sort @a', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -122,6 +134,7 @@ EONT_EONT checkOptree ( name => 'sub {@a = sort @a; reverse @a}', code => sub {@a = sort @a; reverse @a}, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -438 optree.t:286) v 2 <0> pushmark s @@ -154,6 +167,7 @@ checkOptree ( name => '@a = sort @a; reverse @a', prog => '@a = sort @a; reverse @a', errs => ['Useless use of reverse in void context at -e line 1.'], bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -187,6 +201,7 @@ EONT_EONT checkOptree ( name => 'sub {my @a; @a = sort @a}', code => sub {my @a; @a = sort @a}, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -437 optree.t:254) v 2 <0> padav[@a:-437,-436] vM/LVINTRO @@ -216,6 +231,7 @@ EONT_EONT checkOptree ( name => 'my @a; @a = sort @a', prog => 'my @a; @a = sort @a', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -242,6 +258,7 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; push @a, 1}', code => sub {my @a; @a = sort @a; push @a, 1}, bcopts => '-exec', debug => 0, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -437 optree.t:325) v 2 <0> padav[@a:-437,-436] vM/LVINTRO @@ -276,6 +293,7 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; 1}', code => sub {my @a; @a = sort @a; 1}, bcopts => '-exec', debug => 0, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -437 optree.t:325) v 2 <0> padav[@a:-437,-436] vM/LVINTRO diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 3587133..c666245 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -47,11 +47,19 @@ my @warnings_todo; . "propagated to 5.8.x") if $] < 5.009; +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; checkOptree ( name => 'BEGIN', bcopts => 'BEGIN', prog => $src, @warnings_todo, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: # b <1> leavesub[1 ref] K/REFC,1 ->(end) @@ -102,6 +110,7 @@ EONT_EONT checkOptree ( name => 'END', bcopts => 'END', prog => $src, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # END 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) @@ -124,6 +133,7 @@ EONT_EONT checkOptree ( name => 'CHECK', bcopts => 'CHECK', prog => $src, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # CHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) @@ -147,6 +157,7 @@ checkOptree ( name => 'INIT', bcopts => 'INIT', #todo => 'get working', prog => $src, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # INIT 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) @@ -170,6 +181,7 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK -exec', bcopts => [qw/ BEGIN END INIT CHECK -exec /], prog => $src, @warnings_todo, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: # 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t index 04c2b80..e25447d 100644 --- a/ext/B/t/optree_varinit.t +++ b/ext/B/t/optree_varinit.t @@ -23,9 +23,18 @@ skip "no perlio in this build", 22 unless $Config::Config{useperlio}; pass("OPTIMIZER TESTS - VAR INITIALIZATION"); +my @open_todo; +sub open_todo { + if (((caller 0)[10]||{})->{open}) { + @open_todo = (skip => "\$^OPEN is set"); + } +} +open_todo; + checkOptree ( name => 'sub {my $a}', bcopts => '-exec', code => sub {my $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 45 optree.t:23) v # 2 <0> padsv[$a:45,46] M/LVINTRO @@ -39,6 +48,7 @@ EONT_EONT checkOptree ( name => '-exec sub {my $a}', bcopts => '-exec', code => sub {my $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <;> nextstate(main 49 optree.t:52) v # 2 <0> padsv[$a:49,50] M/LVINTRO @@ -52,6 +62,7 @@ EONT_EONT checkOptree ( name => 'sub {our $a}', bcopts => '-exec', code => sub {our $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main 21 optree.t:47) v 2 <#> gvsv[*a] s/OURINTR @@ -65,6 +76,7 @@ EONT_EONT checkOptree ( name => 'sub {local $a}', bcopts => '-exec', code => sub {local $a}, + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main 23 optree.t:57) v:{ 2 <#> gvsv[*a] s/LVINTRO @@ -78,6 +90,7 @@ EONT_EONT checkOptree ( name => 'my $a', prog => 'my $a', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 @@ -93,6 +106,7 @@ EONT_EONT checkOptree ( name => 'our $a', prog => 'our $a', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 @@ -111,6 +125,7 @@ checkOptree ( name => 'local $a', prog => 'local $a', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 @@ -130,6 +145,7 @@ pass("MY, OUR, LOCAL, BOTH SUB AND MAIN, = undef"); checkOptree ( name => 'sub {my $a=undef}', code => sub {my $a=undef}, bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 @@ -150,6 +166,7 @@ checkOptree ( name => 'sub {our $a=undef}', code => sub {our $a=undef}, note => 'the global must be reset', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 @@ -172,6 +189,7 @@ checkOptree ( name => 'sub {local $a=undef}', code => sub {local $a=undef}, note => 'local not used enough to bother', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 @@ -193,6 +211,7 @@ EONT_EONT checkOptree ( name => 'my $a=undef', prog => 'my $a=undef', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 @@ -213,6 +232,7 @@ checkOptree ( name => 'our $a=undef', prog => 'our $a=undef', note => 'global must be reassigned', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 @@ -236,6 +256,7 @@ checkOptree ( name => 'local $a=undef', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], note => 'locals are rare, probly not worth doing', bcopts => '-basic', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 @@ -257,6 +278,7 @@ EONT_EONT checkOptree ( name => 'sub {my $a=()}', code => sub {my $a=()}, bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main -439 optree.t:105) v 2 <0> stub sP @@ -275,6 +297,7 @@ checkOptree ( name => 'sub {our $a=()}', code => sub {our $a=()}, #todo => 'probly not worth doing', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main 31 optree.t:177) v:{ 2 <0> stub sP @@ -293,6 +316,7 @@ checkOptree ( name => 'sub {local $a=()}', code => sub {local $a=()}, #todo => 'probly not worth doing', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <;> nextstate(main 33 optree.t:190) v:{ 2 <0> stub sP @@ -310,6 +334,7 @@ EONT_EONT checkOptree ( name => 'my $a=()', prog => 'my $a=()', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -330,6 +355,7 @@ checkOptree ( name => 'our $a=()', prog => 'our $a=()', #todo => 'probly not worth doing', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -351,6 +377,7 @@ checkOptree ( name => 'local $a=()', errs => ['Name "main::a" used only once: possible typo at -e line 1.'], #todo => 'probly not worth doing', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ @@ -371,6 +398,7 @@ checkOptree ( name => 'my ($a,$b)=()', prog => 'my ($a,$b)=()', #todo => 'probly not worth doing', bcopts => '-exec', + @open_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:{ diff --git a/t/comp/hints.t b/t/comp/hints.t index d15a44a..32267de 100644 --- a/t/comp/hints.t +++ b/t/comp/hints.t @@ -12,8 +12,13 @@ BEGIN { print "1..15\n"; } BEGIN { print "not " if exists $^H{foo}; print "ok 1 - \$^H{foo} doesn't exist initially\n"; - print "not " if $^H & 0x00020000; - print "ok 2 - \$^H doesn't contain HINT_LOCALIZE_HH initially\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 2 - \$^H contains HINT_LOCALIZE_HH initially with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 2 - \$^H doesn't contain HINT_LOCALIZE_HH initially\n"; + } } { # simulate a pragma -- don't forget HINT_LOCALIZE_HH @@ -40,13 +45,23 @@ BEGIN { CHECK { print "not " if exists $^H{foo}; print "ok 9 - \$^H{foo} doesn't exist when compilation complete\n"; - print "not " if $^H & 0x00020000; - print "ok 10 - \$^H doesn't contain HINT_LOCALIZE_HH when compilation complete\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 10 - \$^H contains HINT_LOCALIZE_HH when compilation complete with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 10 - \$^H doesn't contain HINT_LOCALIZE_HH when compilation complete\n"; + } } print "not " if exists $^H{foo}; print "ok 11 - \$^H{foo} doesn't exist at runtime\n"; - print "not " if $^H & 0x00020000; - print "ok 12 - \$^H doesn't contain HINT_LOCALIZE_HH at run-time\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 12 - \$^H contains HINT_LOCALIZE_HH at run-time with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 12 - \$^H doesn't contain HINT_LOCALIZE_HH at run-time\n"; + } # op_entereval should keep the pragmas it was compiled with eval q* print "not " if $^H{foo} ne "a"; @@ -58,8 +73,13 @@ BEGIN { BEGIN { print "not " if exists $^H{foo}; print "ok 7 - \$^H{foo} doesn't exist while finishing compilation\n"; - print "not " if $^H & 0x00020000; - print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 8 - \$^H contains HINT_LOCALIZE_HH while finishing compilation with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n"; + } } require 'test.pl'; -- 2.7.4