diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-11-15 13:05:40 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-11-15 13:05:40 -0600 |
commit | 9e60e8ff0381023d5e49388d32bd04748cb63ec9 (patch) | |
tree | e111047e8b1301ce259972767e5dc53facc42672 /t | |
parent | af3e1f5e6280e1212d8f116cb7f72391c9e43a18 (diff) | |
download | package-stash-xs-9e60e8ff0381023d5e49388d32bd04748cb63ec9.tar.gz package-stash-xs-9e60e8ff0381023d5e49388d32bd04748cb63ec9.zip |
update some test things
Diffstat (limited to 't')
-rw-r--r-- | t/01-basic.t | 4 | ||||
-rwxr-xr-x | t/07-edge-cases.t | 4 | ||||
-rw-r--r-- | t/20-leaks.t | 6 | ||||
-rw-r--r-- | 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 |