This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
podcheck.t: skip make-rmg-checklist
[perl5.git] / t / op / cproto.t
CommitLineData
c0222185
RGS
1#!./perl
2# Tests to ensure that we don't unexpectedly change prototypes of builtins
3
f26e2faa
JH
4BEGIN {
5 chdir 't' if -d 't';
6 @INC = '../lib';
7}
8
0e7f5727 9BEGIN { require './test.pl'; }
84ed0108 10plan tests => 247;
0e7f5727 11
c0222185
RGS
12while (<DATA>) {
13 chomp;
59b085e1 14 (my $keyword, my $proto, local $TODO) = split " ", $_, 3;
c0222185
RGS
15 if ($proto eq 'undef') {
16 ok( !defined prototype "CORE::".$keyword, $keyword );
17 }
18 elsif ($proto eq 'unknown') {
19 eval { prototype "CORE::".$keyword };
20 like( $@, qr/Can't find an opnumber for/, $keyword );
21 }
22 else {
23 is( "(".prototype("CORE::".$keyword).")", $proto, $keyword );
24 }
25}
26
27# the keyword list :
28
29__DATA__
7c4c6e7c
FC
30__FILE__ ()
31__LINE__ ()
32__PACKAGE__ ()
d3dc34ae
FC
33__DATA__ undef
34__END__ undef
84ed0108 35__SUB__ ()
d673215e 36CORE unknown
59b085e1 37abs (_)
c0222185 38accept (**)
59b085e1 39alarm (_)
95f7e41f 40and undef
c0222185
RGS
41atan2 ($$)
42bind (*$)
43binmode (*;$)
44bless ($;$)
f988db8c 45break ()
c0222185
RGS
46caller (;$)
47chdir (;$)
48chmod (@)
49chomp undef
50chop undef
51chown (@)
59b085e1
RGS
52chr (_)
53chroot (_)
c0222185
RGS
54close (;*)
55closedir (*)
95f7e41f 56cmp undef
c0222185 57connect (*$)
0d863452 58continue ()
59b085e1 59cos (_)
c0222185
RGS
60crypt ($$)
61dbmclose (\%)
62dbmopen (\%$$)
d3dc34ae 63default undef
c0222185
RGS
64defined undef
65delete undef
66die (@)
67do undef
68dump ()
cba5a3b0 69each (+)
c0222185
RGS
70else undef
71elsif undef
72endgrent ()
73endhostent ()
74endnetent ()
75endprotoent ()
76endpwent ()
77endservent ()
78eof (;*)
95f7e41f 79eq undef
c0222185 80eval undef
7d789282 81evalbytes (_)
c0222185
RGS
82exec undef
83exists undef
84exit (;$)
59b085e1 85exp (_)
c0222185
RGS
86fcntl (*$$)
87fileno (*)
88flock (*$)
89for undef
90foreach undef
91fork ()
92format undef
93formline ($@)
95f7e41f 94ge undef
c0222185
RGS
95getc (;*)
96getgrent ()
97getgrgid ($)
98getgrnam ($)
99gethostbyaddr ($$)
100gethostbyname ($)
101gethostent ()
102getlogin ()
103getnetbyaddr ($$)
104getnetbyname ($)
105getnetent ()
106getpeername (*)
107getpgrp (;$)
108getppid ()
109getpriority ($$)
110getprotobyname ($)
dcbdef25 111getprotobynumber ($;)
c0222185
RGS
112getprotoent ()
113getpwent ()
114getpwnam ($)
115getpwuid ($)
116getservbyname ($$)
117getservbyport ($$)
118getservent ()
119getsockname (*)
120getsockopt (*$$)
5458a98a 121given undef
c0222185
RGS
122glob undef
123gmtime (;$)
124goto undef
125grep undef
95f7e41f 126gt undef
59b085e1 127hex (_)
c0222185
RGS
128if undef
129index ($$;$)
59b085e1 130int (_)
c0222185
RGS
131ioctl (*$$)
132join ($@)
cba5a3b0 133keys (+)
c0222185
RGS
134kill (@)
135last undef
59b085e1
RGS
136lc (_)
137lcfirst (_)
95f7e41f 138le undef
59b085e1 139length (_)
c0222185
RGS
140link ($$)
141listen (*$)
142local undef
143localtime (;$)
f79aa60b 144lock (\[$@%&*])
59b085e1 145log (_)
465bc0f5 146lstat (;*)
95f7e41f 147lt undef
c0222185
RGS
148m undef
149map undef
d116c547 150mkdir (_;$)
c0222185
RGS
151msgctl ($$$)
152msgget ($$)
153msgrcv ($$$$$)
154msgsnd ($$$)
155my undef
95f7e41f 156ne undef
c0222185
RGS
157next undef
158no undef
dcbdef25 159not ($;)
59b085e1 160oct (_)
c0222185
RGS
161open (*;$@)
162opendir (*$)
95f7e41f 163or undef
59b085e1 164ord (_)
c0222185
RGS
165our undef
166pack ($@)
167package undef
168pipe (**)
cba5a3b0 169pop (;+)
c0222185
RGS
170pos undef
171print undef
172printf undef
173prototype undef
cba5a3b0 174push (+@)
c0222185
RGS
175q undef
176qq undef
177qr undef
59b085e1 178quotemeta (_)
c0222185
RGS
179qw undef
180qx undef
181rand (;$)
182read (*\$$;$)
183readdir (*)
184readline (;*)
59b085e1 185readlink (_)
01f5bc1b 186readpipe (_)
c0222185
RGS
187recv (*\$$$)
188redo undef
59b085e1 189ref (_)
c0222185
RGS
190rename ($$)
191require undef
192reset (;$)
193return undef
194reverse (@)
195rewinddir (*)
196rindex ($$;$)
59b085e1 197rmdir (_)
c0222185 198s undef
e3e804c9 199say undef
c0222185
RGS
200scalar undef
201seek (*$$)
202seekdir (*$)
7391a163 203select undef
c0222185
RGS
204semctl ($$$$)
205semget ($$$)
206semop ($$)
207send (*$$;$)
208setgrent ()
209sethostent ($)
210setnetent ($)
bdf1bb36 211setpgrp (;$$)
c0222185
RGS
212setpriority ($$$)
213setprotoent ($)
214setpwent ()
215setservent ($)
216setsockopt (*$$$)
cba5a3b0 217shift (;+)
c0222185
RGS
218shmctl ($$$)
219shmget ($$$)
220shmread ($$$$)
221shmwrite ($$$$)
222shutdown (*$)
59b085e1 223sin (_)
c0222185
RGS
224sleep (;$)
225socket (*$$$)
226socketpair (**$$$)
227sort undef
cba5a3b0 228splice (+;$$@)
c0222185
RGS
229split undef
230sprintf ($@)
59b085e1 231sqrt (_)
c0222185 232srand (;$)
465bc0f5 233stat (;*)
5458a98a 234state undef
c0222185
RGS
235study undef
236sub undef
237substr ($$;$$)
238symlink ($$)
239syscall ($@)
240sysopen (*$$;$)
241sysread (*\$$;$)
242sysseek (*$$)
243system undef
244syswrite (*$;$$)
245tell (;*)
246telldir (*)
1db4d195
FC
247tie (\[$@%*]$@)
248tied (\[$@%*])
c0222185
RGS
249time ()
250times ()
251tr undef
252truncate ($$)
59b085e1
RGS
253uc (_)
254ucfirst (_)
c0222185
RGS
255umask (;$)
256undef undef
257unless undef
258unlink (@)
ea5703f4 259unpack ($_)
cba5a3b0 260unshift (+@)
1db4d195 261untie (\[$@%*])
c0222185
RGS
262until undef
263use undef
264utime (@)
cba5a3b0 265values (+)
c0222185
RGS
266vec ($$$)
267wait ()
268waitpid ($$)
269wantarray ()
270warn (@)
5458a98a 271when undef
c0222185
RGS
272while undef
273write (;*)
95f7e41f
FC
274x undef
275xor undef
c0222185 276y undef