This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Croak on unimplemented already at import time
[perl5.git] / ext / POSIX / t / unimplemented.t
index 2d8f819..9a03a75 100644 (file)
@@ -83,6 +83,7 @@ foreach ([atexit => 'C-specific: use END {} instead'],
         [strspn => 'C-specific, stopped'],
         [strtok => 'C-specific, stopped'],
         [tmpfile => \'IO::File::new_tmpfile'],
+        [tmpnam => \'use File::Temp'],
         [ungetc => \'IO::Handle::ungetc'],
         [vfprintf => 'C-specific, stopped'],
         [vprintf => 'C-specific, stopped'],
@@ -90,8 +91,8 @@ foreach ([atexit => 'C-specific: use END {} instead'],
        ) {
     my ($func, $action) = @$_;
     my $expect = ref $action
-       ? qr/Use method $$action\(\) instead of POSIX::$func\(\) at \(eval/
-       : qr/Unimplemented: POSIX::$func\(\) is \Q$action\E at \(eval/;
+       ? qr/Unimplemented: POSIX::$func\(\): .*$$action(?:\(\))? instead at \(eval/
+       : qr/Unimplemented: POSIX::$func\(\): \Q$action\E at \(eval/;
     is(eval "POSIX::$func(); 1", undef, "POSIX::$func fails as expected");
     like($@, $expect, "POSIX::$func gives expected error message");
 }