This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get t/uni/cache.t working under minitest
[perl5.git] / t / op / cproto.t
index 3bc8b27..85b86db 100644 (file)
@@ -7,7 +7,7 @@ BEGIN {
 }
 
 BEGIN { require './test.pl'; }
-plan tests => 238;
+plan tests => 254;
 
 while (<DATA>) {
     chomp;
@@ -20,21 +20,38 @@ 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
+       );
     }
 }
 
 # the keyword list :
 
 __DATA__
+__FILE__ ()
+__LINE__ ()
+__PACKAGE__ ()
+__DATA__ undef
+__END__ undef
+__SUB__ ()
+AUTOLOAD undef
+BEGIN undef
+CORE unknown
+DESTROY undef
+END undef
+INIT undef
+CHECK undef
 abs (_)
 accept (**)
 alarm (_)
-and ()
+and undef
 atan2 ($$)
 bind (*$)
 binmode (*;$)
 bless ($;$)
+break ()
 caller (;$)
 chdir (;$)
 chmod (@)
@@ -45,19 +62,20 @@ chr (_)
 chroot (_)
 close (;*)
 closedir (*)
-cmp unknown
+cmp undef
 connect (*$)
 continue ()
 cos (_)
 crypt ($$)
 dbmclose (\%)
 dbmopen (\%$$)
+default undef
 defined undef
 delete undef
 die (@)
 do undef
 dump ()
-each (\%)
+each (+)
 else undef
 elsif undef
 endgrent ()
@@ -67,13 +85,14 @@ endprotoent ()
 endpwent ()
 endservent ()
 eof (;*)
-eq ($$)
-err ()
+eq undef
 eval undef
+evalbytes (_)
 exec undef
 exists undef
 exit (;$)
 exp (_)
+fc (_)
 fcntl (*$$)
 fileno (*)
 flock (*$)
@@ -82,7 +101,7 @@ foreach undef
 fork ()
 format undef
 formline ($@)
-ge ($$)
+ge undef
 getc (;*)
 getgrent ()
 getgrgid ($)
@@ -99,7 +118,7 @@ getpgrp (;$)
 getppid ()
 getpriority ($$)
 getprotobyname ($)
-getprotobynumber ($)
+getprotobynumber ($;)
 getprotoent ()
 getpwent ()
 getpwnam ($)
@@ -110,32 +129,32 @@ getservent ()
 getsockname (*)
 getsockopt (*$$)
 given undef
-glob undef
+glob (_;)
 gmtime (;$)
 goto undef
 grep undef
-gt ($$)
+gt undef
 hex (_)
 if undef
 index ($$;$)
 int (_)
 ioctl (*$$)
 join ($@)
-keys (\%)
+keys (+)
 kill (@)
 last undef
 lc (_)
 lcfirst (_)
-le ($$)
+le undef
 length (_)
 link ($$)
 listen (*$)
 local undef
 localtime (;$)
-lock (\$)
+lock (\[$@%&*])
 log (_)
-lstat (*)
-lt ($$)
+lstat (;*)
+lt undef
 m undef
 map undef
 mkdir (_;$)
@@ -144,25 +163,25 @@ msgget ($$)
 msgrcv ($$$$$)
 msgsnd ($$$)
 my undef
-ne ($$)
+ne undef
 next undef
 no undef
-not ($)
+not ($;)
 oct (_)
 open (*;$@)
 opendir (*$)
-or ()
+or undef
 ord (_)
 our undef
 pack ($@)
 package undef
 pipe (**)
-pop (;\@)
-pos undef
+pop (;+)
+pos (;\[$*])
 print undef
 printf undef
-prototype undef
-push (\@@)
+prototype ($)
+push (+@)
 q undef
 qq undef
 qr undef
@@ -188,10 +207,10 @@ rindex ($$;$)
 rmdir (_)
 s undef
 say undef
-scalar undef
+scalar ($)
 seek (*$$)
 seekdir (*$)
-select (;*)
+select undef
 semctl ($$$$)
 semget ($$$)
 semop ($$)
@@ -205,7 +224,7 @@ setprotoent ($)
 setpwent ()
 setservent ($)
 setsockopt (*$$$)
-shift (;\@)
+shift (;+)
 shmctl ($$$)
 shmget ($$$)
 shmread ($$$$)
@@ -216,14 +235,14 @@ sleep (;$)
 socket (*$$$)
 socketpair (**$$$)
 sort undef
-splice (\@;$$@)
+splice (+;$$@)
 split undef
 sprintf ($@)
 sqrt (_)
 srand (;$)
-stat (*)
+stat (;*)
 state undef
-study undef
+study (_)
 sub undef
 substr ($$;$$)
 symlink ($$)
@@ -235,8 +254,8 @@ system undef
 syswrite (*$;$$)
 tell (;*)
 telldir (*)
-tie undef
-tied undef
+tie (\[$@%*]$@)
+tied (\[$@%*])
 time ()
 times ()
 tr undef
@@ -244,16 +263,16 @@ truncate ($$)
 uc (_)
 ucfirst (_)
 umask (;$)
-undef undef
+undef (;\[$@%&*])
 unless undef
 unlink (@)
-unpack ($;$)
-unshift (\@@)
-untie undef
+unpack ($_)
+unshift (+@)
+untie (\[$@%*])
 until undef
 use undef
 utime (@)
-values (\%)
+values (+)
 vec ($$$)
 wait ()
 waitpid ($$)
@@ -262,6 +281,6 @@ warn (@)
 when undef
 while undef
 write (;*)
-x unknown
-xor ($$)
+x undef
+xor undef
 y undef