From 9e60e8ff0381023d5e49388d32bd04748cb63ec9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 15 Nov 2010 13:05:40 -0600 Subject: update some test things --- t/01-basic.t | 4 +++- t/07-edge-cases.t | 4 +++- t/20-leaks.t | 6 ++++-- t/21-leaks-debug.t | 6 ++++-- 4 files changed, 14 insertions(+), 6 deletions(-) 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 -- cgit v1.2.3-54-g00ecf