tests are expected to fail if dirfd () does not exist
[p5sagit/p5-mst-13.2.git] / t / op / attrs.t
index dc91438..10e2c24 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 95;
+plan 'no_plan';
 
 $SIG{__WARN__} = sub { die @_ };
 
@@ -106,6 +106,11 @@ is ref($thunk), "Z";
 @attrs = eval 'attributes::get $thunk';
 is "@attrs", "locked method Z";
 
+# Test attributes on predeclared subroutines:
+eval 'package A; sub PS : lvalue';
+@attrs = eval 'attributes::get \&A::PS';
+is "@attrs", "lvalue";
+
 # Test ability to modify existing sub's (or XSUB's) attributes.
 eval 'package A; sub X { $_[0] } sub X : lvalue';
 @attrs = eval 'attributes::get \&A::X';
@@ -147,7 +152,8 @@ eval 'my $$foo : bar = 1';
 like $@, qr/Can't declare scalar dereference in my/;
 
 
-my @code = qw(assertion lvalue locked method);
+my @code = qw(lvalue locked method);
+unshift @code, 'assertion' if $] >= 5.009;
 my @other = qw(shared unique);
 my %valid;
 $valid{CODE} = {map {$_ => 1} @code};