Make cproto.t more stringent
authorFather Chrysostomos <sprout@cpan.org>
Sun, 22 Apr 2012 01:30:35 +0000 (18:30 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 04:30:21 +0000 (21:30 -0700)
It was allowing prototype() to return undef where an empty string
was expected.

t/op/cproto.t

index 8870df8..8727897 100644 (file)
@@ -20,7 +20,10 @@ while (<DATA>) {
        like( $@, qr/Can't find an opnumber for/, $keyword );
     }
     else {
-       is( "(".prototype("CORE::".$keyword).")", $proto, $keyword );
+       is(
+           "(".(prototype("CORE::".$keyword) // 'undef').")", $proto,
+           $keyword
+       );
     }
 }