summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-11-15 13:05:40 -0600
committerJesse Luehrs <doy@tozt.net>2010-11-15 13:05:40 -0600
commit9e60e8ff0381023d5e49388d32bd04748cb63ec9 (patch)
treee111047e8b1301ce259972767e5dc53facc42672
parentaf3e1f5e6280e1212d8f116cb7f72391c9e43a18 (diff)
downloadpackage-stash-xs-9e60e8ff0381023d5e49388d32bd04748cb63ec9.tar.gz
package-stash-xs-9e60e8ff0381023d5e49388d32bd04748cb63ec9.zip
update some test things
-rw-r--r--t/01-basic.t4
-rwxr-xr-xt/07-edge-cases.t4
-rw-r--r--t/20-leaks.t6
-rw-r--r--t/21-leaks-debug.t6
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