This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add more tests to cproto.t
[perl5.git] / t / op / cproto.t
index 3f3e871..ee97433 100644 (file)
@@ -7,11 +7,11 @@ BEGIN {
 }
 
 BEGIN { require './test.pl'; }
-plan tests => 234;
+plan tests => 243;
 
 while (<DATA>) {
     chomp;
-    my ($keyword, $proto) = split;
+    (my $keyword, my $proto, local $TODO) = split " ", $_, 3;
     if ($proto eq 'undef') {
        ok( !defined prototype "CORE::".$keyword, $keyword );
     }
@@ -27,10 +27,15 @@ while (<DATA>) {
 # the keyword list :
 
 __DATA__
-abs (;$)
+__FILE__ ()
+__LINE__ ()
+__PACKAGE__ ()
+__DATA__ undef
+__END__ undef
+abs (_)
 accept (**)
-alarm (;$)
-and ()
+alarm (_)
+and undef
 atan2 ($$)
 bind (*$)
 binmode (*;$)
@@ -41,23 +46,24 @@ chmod (@)
 chomp undef
 chop undef
 chown (@)
-chr (;$)
-chroot (;$)
+chr (_)
+chroot (_)
 close (;*)
 closedir (*)
-cmp unknown
+cmp undef
 connect (*$)
 continue ()
-cos (;$)
+cos (_)
 crypt ($$)
 dbmclose (\%)
 dbmopen (\%$$)
+default undef
 defined undef
 delete undef
 die (@)
 do undef
 dump ()
-each (\%)
+each (+)
 else undef
 elsif undef
 endgrent ()
@@ -67,13 +73,12 @@ endprotoent ()
 endpwent ()
 endservent ()
 eof (;*)
-eq ($$)
-err unknown
+eq undef
 eval undef
 exec undef
 exists undef
 exit (;$)
-exp (;$)
+exp (_)
 fcntl (*$$)
 fileno (*)
 flock (*$)
@@ -82,7 +87,7 @@ foreach undef
 fork ()
 format undef
 formline ($@)
-ge ($$)
+ge undef
 getc (;*)
 getgrent ()
 getgrgid ($)
@@ -109,74 +114,75 @@ getservbyport ($$)
 getservent ()
 getsockname (*)
 getsockopt (*$$)
+given undef
 glob undef
 gmtime (;$)
 goto undef
 grep undef
-gt ($$)
-hex (;$)
+gt undef
+hex (_)
 if undef
 index ($$;$)
-int (;$)
+int (_)
 ioctl (*$$)
 join ($@)
-keys (\%)
+keys (+)
 kill (@)
 last undef
-lc (;$)
-lcfirst (;$)
-le ($$)
-length (;$)
+lc (_)
+lcfirst (_)
+le undef
+length (_)
 link ($$)
 listen (*$)
 local undef
 localtime (;$)
-lock (\$)
-log (;$)
-lstat (*)
-lt ($$)
+lock (\[$@%*])
+log (_)
+lstat undef
+lt undef
 m undef
 map undef
-mkdir (;$$)
+mkdir (_;$)
 msgctl ($$$)
 msgget ($$)
 msgrcv ($$$$$)
 msgsnd ($$$)
 my undef
-ne ($$)
+ne undef
 next undef
 no undef
 not ($)
-oct (;$)
+oct (_)
 open (*;$@)
 opendir (*$)
-or ()
-ord (;$)
+or undef
+ord (_)
 our undef
 pack ($@)
 package undef
 pipe (**)
-pop (;\@)
+pop (;+)
 pos undef
 print undef
 printf undef
 prototype undef
-push (\@@)
+push (+@)
 q undef
 qq undef
 qr undef
-quotemeta (;$)
+quotemeta (_)
 qw undef
 qx undef
 rand (;$)
 read (*\$$;$)
 readdir (*)
 readline (;*)
-readlink (;$)
-readpipe unknown
+readlink (_)
+readpipe (_)
 recv (*\$$$)
 redo undef
-ref (;$)
+ref (_)
 rename ($$)
 require undef
 reset (;$)
@@ -184,8 +190,9 @@ return undef
 reverse (@)
 rewinddir (*)
 rindex ($$;$)
-rmdir (;$)
+rmdir (_)
 s undef
+say undef
 scalar undef
 seek (*$$)
 seekdir (*$)
@@ -203,23 +210,24 @@ setprotoent ($)
 setpwent ()
 setservent ($)
 setsockopt (*$$$)
-shift (;\@)
+shift (;+)
 shmctl ($$$)
 shmget ($$$)
 shmread ($$$$)
 shmwrite ($$$$)
 shutdown (*$)
-sin (;$)
+sin (_)
 sleep (;$)
 socket (*$$$)
 socketpair (**$$$)
 sort undef
-splice (\@;$$@)
+splice (+;$$@)
 split undef
 sprintf ($@)
-sqrt (;$)
+sqrt (_)
 srand (;$)
-stat (*)
+stat undef
+state undef
 study undef
 sub undef
 substr ($$;$$)
@@ -232,32 +240,33 @@ system undef
 syswrite (*$;$$)
 tell (;*)
 telldir (*)
-tie undef
-tied undef
+tie (\[$@%*]$@)
+tied (\[$@%*])
 time ()
 times ()
 tr undef
 truncate ($$)
-uc (;$)
-ucfirst (;$)
+uc (_)
+ucfirst (_)
 umask (;$)
 undef undef
 unless undef
 unlink (@)
 unpack ($;$)
-unshift (\@@)
-untie undef
+unshift (+@)
+untie (\[$@%*])
 until undef
 use undef
 utime (@)
-values (\%)
+values (+)
 vec ($$$)
 wait ()
 waitpid ($$)
 wantarray ()
 warn (@)
+when undef
 while undef
 write (;*)
-x unknown
-xor ($$)
+x undef
+xor undef
 y undef