From: Jesse Luehrs Date: Mon, 15 Nov 2010 19:05:40 +0000 (-0600) Subject: update some test things X-Git-Tag: 0.15~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e60e8ff0381023d5e49388d32bd04748cb63ec9;p=gitmo%2FPackage-Stash-XS.git update some test things --- diff --git a/t/01-basic.t b/t/01-basic.t index 79c72f1..77c9c13 100644 --- a/t/01-basic.t +++ b/t/01-basic.t @@ -391,7 +391,9 @@ like(exception { [qw(BEGIN bar baz foo quuuux quuux quux)], "list_all_symbols", ); - { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef; + { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP') + ? "undef scalars aren't visible on 5.8, or from pure perl at all" + : undef; is_deeply( [sort $quuux->list_all_symbols('SCALAR')], [qw(foo)], diff --git a/t/07-edge-cases.t b/t/07-edge-cases.t index 17ec84c..feec31e 100755 --- a/t/07-edge-cases.t +++ b/t/07-edge-cases.t @@ -25,7 +25,9 @@ use Package::Stash; } my $stash = Package::Stash->new('Foo'); -{ local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef; +{ local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP') + ? "undef scalars aren't visible on 5.8, or from pure perl at all" + : undef; ok($stash->has_symbol('$SCALAR'), '$SCALAR'); } ok($stash->has_symbol('$SCALAR_WITH_VALUE'), '$SCALAR_WITH_VALUE'); diff --git a/t/20-leaks.t b/t/20-leaks.t index e97d7d6..570b56e 100644 --- a/t/20-leaks.t +++ b/t/20-leaks.t @@ -123,7 +123,9 @@ use Symbol; @{$foo->get_or_add_symbol('@ISA')} = @super; $foo->get_or_add_symbol('$glob'); } "get_or_add_symbol doesn't leak"; - { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef; + { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP') + ? "undef scalars aren't visible on 5.8, or from pure perl at all" + : undef; ok($foo->has_symbol('$glob')); } is(ref($foo->get_symbol('$glob')), 'SCALAR'); @@ -157,7 +159,7 @@ use Symbol; $foo->get_all_symbols('SCALAR'); $foo->get_all_symbols('CODE'); $blah->get_all_symbols('CODE'); - } "list_all_symbols doesn't leak"; + } "get_all_symbols doesn't leak"; } # mimic CMOP::create_anon_class diff --git a/t/21-leaks-debug.t b/t/21-leaks-debug.t index 292a28c..345c30c 100644 --- a/t/21-leaks-debug.t +++ b/t/21-leaks-debug.t @@ -125,7 +125,9 @@ use Symbol; @{$foo->get_or_add_symbol('@ISA')} = @super; $foo->get_or_add_symbol('$glob'); } "get_or_add_symbol doesn't leak"; - { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef; + { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP') + ? "undef scalars aren't visible on 5.8, or from pure perl at all" + : undef; ok($foo->has_symbol('$glob')); } is(ref($foo->get_symbol('$glob')), 'SCALAR'); @@ -159,7 +161,7 @@ use Symbol; $foo->get_all_symbols('SCALAR'); $foo->get_all_symbols('CODE'); $blah->get_all_symbols('CODE'); - } "list_all_symbols doesn't leak"; + } "get_all_symbols doesn't leak"; } # mimic CMOP::create_anon_class